Simpler and better approach:

routes_in = (
    # do not reroute admin unless you want to disable it
    (BASE + '/admin', '/admin/default/index')
    , (BASE + '/admin/$anything', '/admin/$anything')
    # do not reroute appadmin unless you want to disable it
    , (BASE + '/$app/appadmin', '/$app/appadmin/index')
    , (BASE + '/$app/appadmin/$anything', '/$app/appadmin/$anything')

    # default controller
    , ('/', '/%s/default/index' % default_application)
    , ('/$c', '/%s/$c/index' % default_application)
    , ('/$c/$f', '/%s/$c/$f' % default_application)
    , ('/$anything', '/%s/static/$anything' % default_application)
    , (BASE + '/$anything', '/$anything')
]

routes_out = (
    # do not reroute admin unless you want to disable it
    ('/admin/$anything', BASE + '/admin/$anything')
    # do not reroute appadmin unless you want to disable it
    , ('/$app/appadmin/$anything', BASE + '/$app/appadmin/$anything')
)

Works well, I have to put aside web2py default autoroutes but this is what 
i wanted.

I still dont quite get routes_out, when a route is coming from the app? 
only on redirections? Thanks.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to