On Mon, Mar 24, 2008 at 9:23 AM, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> that would be ideal. url_for() doesnt seem to work like that though
> (maybe its because of the debug environment?) it spits back the same
> url i give it, or will give me a named url. its annoying.
It's not the debug environment. Routes has some ambiguities in its
definition, so it's not always predictable which route url_for
chooses. These ambiguities are being eliminated in Routes 2. I don't
know if that's the cause of your specific problems. Make sure you
have the latest version of Routes 1 (1.7.2), Try these settings to
tighten down the behavior:
map = Mapper(explicit=True)
map.hardcode_names = True
'explicit' turns off route memory, so don't use it if you're depending
on that. It also turns off automatic action='index' & id=None.
'hardcode_names' supposedly ensures that if you call url_for("name"),
it will choose the route with that name and no other.
--
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
-~----------~----~----~----~------~----~------~--~---