I need help writing routes_in/out to achieve this:
Strip the application name and controller from the url
http:\\localhost\tables where tables is a function inside default.py
At the same time im declaring static files as:
<link rel="stylesheet" type="text/css" href="css/theme.css">
So i need to map "css/theme.css" to "http:\\localhost\css\theme.css"
regardless the current url
So routes_in should be something like:
('/', '/myapp/default/index'), #for home page
#static files
('/css/$anything', '/myapp/static/css/$anything')
('/js/$anything', '/myapp/static/js/$anything')
('/img/$anything', '/myapp/static/img/$anything')
#finally let through actions
('/$anything', '/myapp/default/index/$anything')
The problem is, if im at:
http:\\localhost\tables
the static files are maped as
http:\\localhost\tables\css\theme.css and returns 404
Another question is if i should include static routes in routes_out.
Appreciate any advise.
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 [email protected].
For more options, visit https://groups.google.com/d/optout.