Re: [web2py] Controller wide auth

2010-06-10 Thread Jean Guy
Don't work. 2010/6/10 Jean Guy > With decorator it works. > > I try with urllib2. > > > Jonhy > > 2010/6/10 Doug Warren > >> I'm not sure actually the code was mostly cut and pasted directly from >> tools.py perhaps it needs an import urllib2 as well? The code as >> written was deployed on m

Re: [web2py] Controller wide auth

2010-06-10 Thread Jean Guy
With decorator it works. I try with urllib2. Jonhy 2010/6/10 Doug Warren > I'm not sure actually the code was mostly cut and pasted directly from > tools.py perhaps it needs an import urllib2 as well? The code as > written was deployed on my stock 2.6 win32 python and web2py from > source (no

Re: [web2py] Controller wide auth

2010-06-10 Thread Doug Warren
I'm not sure actually the code was mostly cut and pasted directly from tools.py perhaps it needs an import urllib2 as well? The code as written was deployed on my stock 2.6 win32 python and web2py from source (not from exe.) I haven't tried it yet in my production environment. Try it with the dec

Re: [web2py] Controller wide auth

2010-06-10 Thread Jean Guy
Try to import in ipython it pass... urllib seems to be part of other package in ubuntu : http://stackoverflow.com/questions/2532321/python-importerror-no-module-named-urllib or python-m2crypto Don't know which one is best... Could it depends of python version? Jonhy 2010/6/10 Jean Guy > Get

Re: [web2py] Controller wide auth

2010-06-10 Thread Jean Guy
Getting : http://127.0.0.1:8000/dev/default/user/login?_next=/dev/default/user/login%3F_next%3D%252Fdev%252Fdefault%252Fuser%252Flogin%253F_next%253D%25252Fdev%25252Fdefault%25252Fuser%25252Flogin%25253F_next%25253D%2525252Fdev%2525252Fdefault%2525252Fuser%2525252Flogin%2525253F_next%2525253D%2525

Re: [web2py] Controller wide auth

2010-06-10 Thread Jean Guy
The redirect those not work out of the box... Jonhy 2010/6/10 Jean Guy > You are a nice guy! > > > Thank you. > > Jonhy > > 2010/6/10 Doug Warren > > I've had an issue lately where pretty much every function in a >> controller needed an auth decorator. Given how many functions were in >> the

Re: [web2py] Controller wide auth

2010-06-10 Thread Jean Guy
You are a nice guy! Thank you. Jonhy 2010/6/10 Doug Warren > I've had an issue lately where pretty much every function in a > controller needed an auth decorator. Given how many functions were in > the controller this turned out to be an error prone forgetful process. > So I came up with a

[web2py] Controller wide auth

2010-06-10 Thread Doug Warren
I've had an issue lately where pretty much every function in a controller needed an auth decorator. Given how many functions were in the controller this turned out to be an error prone forgetful process. So I came up with a simple and probably obvious way to make a controller wide auth check comp