> > > So far in my project.py i added the routing: > > config.add_route('normalView', '/view/{id}') >> config.add_route('updatedView', '/view/{id}') > > > Hi Michael, this is not going to work, you expect your matching pattern /view/{id} to be mapped to 2 different route names. Pyramid will always use the first one.
[...] my problem is in my view.mako file: > > <h1>View: ${name}</h1> >> <a href="${request.route_url('updateView', id='${id}')}">Execute Code and >> Update this site</a> ## this link will refer to host:8080/view/%24%7Bid%7D >> > > As andi pointed out, when you write *${* you enter python, therefore you can use your variable* id *until the next* }* ${request.route_url('updateView', id=*id*)} So both of your: request.route_url('normalView', id=5) request.route_url('updatedView', id=5) will generate /view/5 but the url dispatch pattern matcher will always identify them as the route "normalView". http://pyramid.readthedocs.org/en/latest/narr/urldispatch.html http://pyramid.readthedocs.org/en/latest/narr/urldispatch.html#route-declaration-ordering -- Petr -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.