I have a route made like this:
map.resource('customer', 'customers', controller='customers',
name_prefix='', path_prefix='')
map.resource('instrument', 'basket', controller='basket', parent_resource=dict(
member_name='customer', collection_name='customers'))
This allows me to match URL like: /customers/foobar/basket/FOOBAR
But if a point happens in the id it does not match anymore:
2008-11-24 14:10:48,649 DEBUG [routes.middleware] Matched GET
/customers/acme/basket/FO.O.BAR
2008-11-24 14:10:48,649 DEBUG [routes.middleware] Route path:
'customers/:customer_id/basket/:(id).:(format)', defaults: {'action':
u'show', 'controller': u'basket', 'id': None}
2008-11-24 14:10:48,649 DEBUG [routes.middleware] Match dict:
{'action': u'show', 'controller': u'basket', 'customer_id': u'acme',
'id': u'CDX', 'format': u'O.BAR'}
I thought it was a problem of id matching in routes (I'm using 1.7.3)
so I tried to upload to 1.10.1 but the problem still presents itself.
Is there a way to avoid this? I think I can do it with some kind of
trick with a greedy regular expression but I cannot pass
"requirements" to map.resource
--
Lawrence, neropercaso.it - oluyede.org
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---