Hello!
I have a problem with named routes. I defined two routes with different
names and same dynamic part. Now, when I'm using url_for to generate an url
for one of the routes, it just use the first connected route, independently
on the specified name. Like this:
>>> from routes import *
>>> m = Mapper()
>>> m.connect('gallery_thumb', 'images/gallery/:(image_id)_thumbnail.jpg')
>>> m.connect('gallery', 'images/gallery/:(image_id).jpg')
>>> url_for('gallery_thumb', image_id=1)
'/images/gallery/1_thumbnail.jpg'
>>> url_for('gallery', image_id=1)
'/images/gallery/1_thumbnail.jpg'
I don't get the problem, why that? It drives me crazy :)
Thanks for help!
--
WBR, Dan Korostelev
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---