You can put this routes_out = map(lambda x:(x[1], x[0]), routes_in) yourself in routes. It should not be the default because if people use regex in routes, this way of doing reversed mapping would not work.
On Apr 10, 6:57 pm, Álvaro Justen [Turicas] <alvarojus...@gmail.com> wrote: > On Fri, Apr 10, 2009 at 10:28 AM, mdipierro <mdipie...@cs.depaul.edu> wrote: > > Good point! I can add this. > > Thanks. :-) > > Another improvement: if routes_out is not defined, I think web2py can > create it directly based on routes_in, like: > > routes_out = map(lambda x:(x[1], x[0]), routes_in) > > If you do not want this to be default, just add as a comment in > routes.py - it can save time of many developers to don't > copy-paste-and-invert-tuples. > > In fact, it won't work if you use regexes to rewrite URLs, but works > for all static cases. > > -- > Álvaro Justen > Peta5 - Telecomunicações e Software Livre > 21 3021-6001 / 9898-0141 > http://www.peta5.com.br/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---