Le 10/07/2011 13:08, Stéphane Klein a écrit :
Hi,
I've some difficulty with config.add_route :
* I would like to match : "/edit.html" and "/.*/edit.html
Actually, I 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"
)
config.add_route(
"root_edit_page", "/edit.html",
traverse="/"
)
config.add_view(
root_edit_page_view,
route_name="root_edit_page",
context=Resource,
renderer="edit_page.tmpl"
)
Other issue, this match :
* /edit.html
* /foo/edit.html
but not match :
* /foo/bar/edit.html
{traverse:.*} don't "eat" / character ?
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.