In your web2py root folder, you have a base routes.py for example in the base routes.py you define your two applications app1 and app2 :
# -*- coding: utf-8 -*- #app1 routes_app = ( (r'.*?:https?://www.app1.com:\w* /$anything', r'app1'), (r'.*?:https?://app1.com:\w* /$anything', r'app1') ) #app2 routes_app += ( (r'.*?:https?://www.app2.net:\w* /$anything', r'app2'), (r'.*?:https?://app2.net:\w* /$anything', r'app2') ) Then in your application folder (app1 & app2) you have an other routes.py which will be used in place of base routes.py for this app. For example In app1 folder : # -*- coding: utf-8 -*- routes_in = ( (r'/', r'/app1/default/index'), (r'/images', r'/app1/images/images_list'), (r'/contact', r'/app1/default/contact_form'), ) routes_out = [(x, y) for (y, x) in routes_in] Le jeudi 13 juin 2013 14:04:39 UTC+2, Júlia Rizza a écrit : > > I was reading about the specific routes of applications in the > book<http://web2py.com/books/default/chapter/29/04#Pattern-based-system>section > Application-Specific URL rewrite, but didn't understand well how it > works. Could someone explain for me how routes_app create a routes.py > specific in each app and, if possible, give me an example? > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.