On Sun, Feb 15, 2009 at 9:15 AM, Eric Lemoine <[email protected]> wrote:
>
> Hi
>
> The Pylons Book gives an example of using a wildcard in a route. The
> example fails with Routes-1.10.3.
>
>>>> def controller_scan(directory=None):
>>>>     return ['error', 'page']
> ...
>>>> from routes import Mapper
>>>> map = Mapper(controller_scan=controller_scan)
>>>> map.minimization = False
>>>> map.connect('/wiki/{controller}/{action}/{*url}')


I think the new syntax uses a requirement for that:

map.connect('/wiki/{controller}/{action}/{url:.*}')

I didn't like using a requirement that way, so I stuck to the old
syntax:  /stats/*path_info .  I suppose you can combine that with {}
but I haven't tried it.  So one of these or both will probably work
too:

map.connect('/wiki/{controller}/{action}/*url'_
map.connect('/wiki/:controller/:action/*url')

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