On Tue, Jun 30, 2009 at 8:52 PM, Jon<[email protected]> wrote:
>
> I've been having some issues with Routes and some problems in the
> documentation and on the web pages for routes are not making things
> any easier.
>
> First, the version on the routes web page is 1.3.2, released in 2006.
>
> However, that wasn't the issue I was experiencing, although I found it
> odd that the download page did not include a link to pypi.
>
> The bigger issue was due to some issues with the documentation.
>
> The first issue I had took me a while to figure out. Ultimately, I was
> experimenting with using .resource and having very little luck. The
> reasons why are listed below:
>
> 1. According to http://routes.groovie.org/integration.html all I
> really need to do is set up a Mapper, call create_regs, and then I'm
> free to use routematch.  This isn't true, really, as the environ is
> necessary for things like the method. I assumed, perhaps, that if the
> method wasn't present that it would default to GET, as it routematch
> did not return an error but it also didn't return what I expected when
> I started using the documented approach, which leads me to my second
> issue:
>
> 2. The documentation in two places needs fixing. The first is in the
> Manual for how to use .resource. The variable used switches from
> 'm' (used in other places) to 'map' (a reserved word). The second is
> that the examples for .resource are wrong.  No longer are semicolons
> used, which is weird, as they are allowed by the HTTP and URL RFCs. I
> did, of course, check the group and saw the forwarding problem, but
> honestly the semicolon variant appears nicer and is somewhat more
> correct. (/path/to/object/edit is not a resource, it is a view. /path/
> to/object;edit is a view *of* object) but that train has already left.
> Therefore, let me please suggest that the docs get these minor
> cleanups, and the download page include an up-to-date version for
> Routes, and a link to pypi.

There's a newer manual at http://sluggo.scrapping.cc/python/routes-manual.html
It will be integrated as soon as I have time to figure out how to
integrate it into the new Sphinx documentation system and Pylons site.

I'm not sure what you're asking in (1), but Routes works hand in hand
with the RoutesMiddleware.  I would follow what the middleware does to
see the proper usage.  Also, minimization and implicit defaults are
disabled by default now, and pylons.url does not use route memory
unless you call url.current().  This may affect which route gets
chosen vs what you were expecting.  Routes does not look at the
request method as far as I know, so I'm not sure what you mean there.

As for (2), hopefully the syntax inconsistencies have been cleared up.
 The ";edit" syntax was changed to "/" because ";" is not allowed in
URL paths, as we discovered later.  Semicolons delimit key=value pairs
in the route path (distinct from the query string), a feature which is
rarely used but exists.  In this we followed the Rails version of
Routes, which made the same change.

-- 
Mike Orr <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to