[web2py] Re: Is it posible to fallback to static files when a controller is not found?

2017-08-31 Thread Massimo Di Pierro
routes_out is used when mapping a URL('controller','function') into an actual url. It is called reversed routing in other frameworks. On Sunday, 27 August 2017 17:49:47 UTC-5, Alfonso Serra wrote: > > Simpler and better approach: > > routes_in = ( > # do not reroute admin unless you want to

[web2py] Re: Is it posible to fallback to static files when a controller is not found?

2017-08-27 Thread Alfonso Serra
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',

[web2py] Re: Is it posible to fallback to static files when a controller is not found?

2017-08-27 Thread Alfonso Serra
Think i got it: routes.py: routes_onerror = [ # (r'init/400', r'/init/default/login') # ,(r'init/*', r'/init/static/fail.html') # ,(r'*/404', r'/init/static/cantfind.html') ('*/*', '/myapp/default/handle_error') ] In app/default.py def handle_error(): code =