Le 10/07/2011 13:08, Stéphane Klein a écrit :
I would like to do that :
config.add_route(
"edit_page", "{traverse:.*}/edit.html",
traverse="{traverse}"
)
config.add_view(
edit_page_view,
route_name="edit_page",
context=Resource,
renderer="edit_page.tmpl"
)
But {traverse:.*} don't match empty string.
How can I fix it ?
I found a tips :
config.add_route(
"edit_page", "/{traverse:.*?}{trash:/?}edit.html",
traverse="{traverse}"
)
config.add_view(
edit_page_view,
route_name="edit_page",
context=Resource,
renderer="edit_page.tmpl"
)
I've appended {trash:/?}. Is there a better solution ?
Regards,
Stephane
--
Stéphane Klein <[email protected]>
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com
--
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.