On Feb 13, 2011, at 5:53 PM, Plumo wrote:
> In the main routes.py I have:
>
> routes_app = ((r'/(?P<app>cms|admin)\b.*', r'\g<app>'),
> (r'(.*)', r'cms'),
> (r'/?(.*)', r'cms'))
The last one is redundant, I think.
>
>
> And in my application specific routes.py I have:
>
> routes_in = (
> ('/', '/cms/plugin_wiki/page/index'),
> ('/about', '/cms/plugin_wiki/page/about'),
> ('/faq', '/cms/plugin_wiki/page/faq'),
> )
> routes_out = [(x, y) for (y, x) in routes_in]
>
>
> Is there a better way to do this using the new version of routes?
I don't think so. The closest you can come is to make cms and plugin_wiki the
default application and controller, but it won't suppress the function as long
as there's an argument. So you'd end up with paths like /page/index,
page/about, page/faq.
I could manage something like what you're doing if you'd be prepared to specify
a list of functions in the default controller.