Re: [web2py] How to use routes

2011-02-17 Thread Bruno Rocha
Jonathan, Taking autoroutes.py http://snipt.net/rochacbruno/routespy/ http://snipt.net/rochacbruno/routespy/how can I define routes on error for 404? thanks. Bruno Rocha http://about.me/rochacbruno/bio

Re: [web2py] How to use routes

2011-02-17 Thread Jonathan Lundell
On Feb 17, 2011, at 3:37 AM, Bruno Rocha wrote: Taking autoroutes.py http://snipt.net/rochacbruno/routespy/ how can I define routes on error for 404? If I understand the question, you just define them in the usual way. Notice that autoroutes, ends up defining routes_in and routes_out; it

Re: [web2py] How to use routes

2011-02-17 Thread Andrew Evans
hey is there anyway to say get the current site the user is on for example: routes_onerror = [(r'*/*', r'/dojo/error/index')] this returns all domains to dojo/error/index. Is it possible to do somehing like this /request.application/error/index/ any ideas *cheers

Re: [web2py] How to use routes

2011-02-17 Thread Andrew Evans
Just figured it out :-) routes_onerror = [(r'*/*', r'/error/index')] works if error/index is in the application *cheers tested it with two domains

Re: [web2py] How to use routes

2011-02-17 Thread Jonathan Lundell
On Feb 17, 2011, at 9:01 AM, Andrew Evans wrote: hey is there anyway to say get the current site the user is on for example: routes_onerror = [(r'*/*', r'/dojo/error/index')] this returns all domains to dojo/error/index. Is it possible to do somehing like this

Re: [web2py] How to use routes

2011-02-17 Thread Jonathan Lundell
On Feb 17, 2011, at 9:16 AM, Andrew Evans wrote: Just figured it out :-) routes_onerror = [(r'*/*', r'/error/index')] works if error/index is in the application *cheers tested it with two domains Depending on routes_in, yes.

Re: [web2py] How to use routes

2011-02-16 Thread Andrew Evans
hello it has stopped working for some reason and I have no idea what is wrong :-? routes_onerror = [('dojo/*','/dojo/error/index'), ('musico/*, /musico/error/index'),] def index(): if request.vars.code == '400': redirect(URL('default', 'index')) elif

Re: [web2py] How to use routes

2011-02-16 Thread Andrew Evans
Sorry I mean this routes_onerror = [('dojo/*', '/dojo/error/index'), ('musico/*', '/musico/error/index'),] returns a invalid request when going www.namiyama.com/index.php *cheers On Wed, Feb 16, 2011 at 4:07 PM, Andrew Evans randra...@gmail.com wrote: hello it has

Re: [web2py] How to use routes

2011-02-16 Thread Jonathan Lundell
On Feb 16, 2011, at 4:13 PM, Andrew Evans wrote: Sorry I mean this routes_onerror = [('dojo/*', '/dojo/error/index'), ('musico/*', '/musico/error/index'),] returns a invalid request when going www.namiyama.com/index.php I think the problem is that when the above URL is

Re: [web2py] How to use routes

2011-02-16 Thread Andrew Evans
Hi ty for your help my routes in is just standard with example routes file routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'), (r'.*:/robots.txt', r'/examples/static/robots.txt'), ((r'.*http://otherdomain.com.* (?Pany.*)', r'/app/ctr\gany'))) any

Re: [web2py] How to use routes

2011-02-16 Thread Jonathan Lundell
On Feb 16, 2011, at 4:29 PM, Andrew Evans wrote: Hi ty for your help my routes in is just standard with example routes file routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'), (r'.*:/robots.txt', r'/examples/static/robots.txt'),

Re: [web2py] How to use routes

2011-02-16 Thread Jonathan Lundell
On Feb 16, 2011, at 5:04 PM, Jonathan Lundell wrote: On Feb 16, 2011, at 4:29 PM, Andrew Evans wrote: Hi ty for your help my routes in is just standard with example routes file routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'), (r'.*:/robots.txt',

[web2py] How to use routes

2011-02-15 Thread Andrew Evans
Hello I am running the latest version of web2py and apach2 on debian lenny but it doesn't seem like my routes.py file is being used I still get invalid controller instead of my message. is there anything in particular I have to do with apache to get routes.py to run *cheers

[web2py] How to use routes

2011-02-15 Thread pbreit
Maybe provide your routes.py code?

Re: [web2py] How to use routes

2011-02-15 Thread Andrew Evans
Hi ty for the reply and sorry about my message it was quickly done up I only added this line to the routes.example.py and renamed it routes.py routes_onerror = [('dojo0/*','/dojo/error/index')] the controller error/index is this def index(): if request.vars.code == '400': return

Re: [web2py] How to use routes

2011-02-15 Thread Jonathan Lundell
On Feb 15, 2011, at 9:25 PM, Andrew Evans wrote: Hi ty for the reply and sorry about my message it was quickly done up I only added this line to the routes.example.py and renamed it routes.py routes_onerror = [('dojo0/*','/dojo/error/index')] Did you mean 'dojo0' or 'dojo'? the

Re: [web2py] How to use routes

2011-02-15 Thread Andrew Evans
Ok ty I got it haha now I feel like a novice :-P I had an extra period in the routes.py filename so it was routes..py any ty for the advice *cheers Andrew