On Jan 8, 2007, at 5:47 AM, Max Ischenko wrote:

Can someone show the reasoning behind putting ';' (semicolon) in the
urls, like this one:

   m.connect('user/new;preview', controller='user', action='preview',
conditions=dict(method=['POST']) )

Does the symbol have any special meaning? Where does it come from?

It's intended as the new place for the 'action' in a RESTful setup. Since under REST, the action is typically the HTTP verb (PUT, GET, DELETE), the URI is supposed to refer to the resource being modified. This is a bit different from the default Routes setup which uses a section of the URL for the action. Using a semicolon is actually an 'approved' method for adding non-query arg information to the URL, and is the same style used by the Rails map.resource command which the Routes one is styled off of.

Maybe someone else has more info on it? I know there were a few different people I saw talking about this and noting that it was a good convention, though obviously not the only one available.

HTH,
Ben

--~--~---------~--~----~------------~-------~--~----~
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