Don't work.


2010/6/10 Jean Guy <jean...@gmail.com>

> With decorator it works.
>
> I try with urllib2.
>
>
> Jonhy
>
> 2010/6/10 Doug Warren <doug.war...@gmail.com>
>
>> 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 decorator
>> @auth.requires_login( )
>> def index():
>>    return dict(message="Logged in")
>>
>> On Thu, Jun 10, 2010 at 9:11 AM, Jean Guy <jean...@gmail.com> wrote:
>> > 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 <jean...@gmail.com>
>> >>
>> >> 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%252525252Fdev%252525252Fdefault%252525252Fuser%252525252Flogin%252525253F_next%252525253D%25252525252Fdev%25252525252Fdefault%25252525252Fuser%25252525252Flogin%25252525253F_next%25252525253D%2525252525252Fdev%2525252525252Fdefault%2525252525252Fuser%2525252525252Flogin%2525252525253F_next%2525252525253D%252525252525252Fdev%252525252525252Fdefault%252525252525252Fuser%252525252525252Flogin%252525252525253F_next%252525252525253D%25252525252525252Fdev%25252525252525252Fdefault%25252525252525252Fuser%25252525252525252Flogin%25252525252525253F_next%25252525252525253D%2525252525252525252Fdev%2525252525252525252Fdefault%2525252525252525252Fuser%2525252525252525252Flogin%2525252525252525253F_next%2525252525252525253D%252525252525252525252Fdev%252525252525252525252Fdefault%252525252525252525252Fuser%252525252525252525252Flogin%252525252525252525253F_next%252525252525252525253D%25252525252525252525252Fdev%25252525252525252525252Fdefault%25252525252525252525252Fuser%25252525252525252525252Flogin%25252525252525252525253F_next%25252525252525252525253D%2525252525252525252525252Fdev%2525252525252525252525252Fdefault%2525252525252525252525252Fuser%2525252525252525252525252Flogin%2525252525252525252525253F_next%2525252525252525252525253D%252525252525252525252525252Fdev%252525252525252525252525252Fdefault%252525252525252525252525252Fuser%252525252525252525252525252Flogin%252525252525252525252525253F_next%252525252525252525252525253D%25252525252525252525252525252Fdev%25252525252525252525252525252Fdefault%25252525252525252525252525252Fuser%25252525252525252525252525252Flogin%25252525252525252525252525253F_next%25252525252525252525252525253D%2525252525252525252525252525252Fdev%2525252525252525252525252525252Fdefault%2525252525252525252525252525252Fuser%2525252525252525252525252525252Flogin%2525252525252525252525252525253F_next%2525252525252525252525252525253D%252525252525252525252525252525252Fdev%252525252525252525252525252525252Fdefault%252525252525252525252525252525252Fuser%252525252525252525252525252525252Flogin%252525252525252525252525252525253F_next%252525252525252525252525252525253D%25252525252525252525252525252525252Fdev%25252525252525252525252525252525252Fdefault%25252525252525252525252525252525252Fuser%25252525252525252525252525252525252Flogin%25252525252525252525252525252525253F_next%25252525252525252525252525252525253D%2525252525252525252525252525252525252Fdev%2525252525252525252525252525252525252Fdefault%2525252525252525252525252525252525252Fuser%2525252525252525252525252525252525252Flogin%2525252525252525252525252525252525253F_next%2525252525252525252525252525252525253D%252525252525252525252525252525252525252Fdev%252525252525252525252525252525252525252Fdefault%252525252525252525252525252525252525252FTABEL
>> >>
>> >> instead of :
>> >>
>> >> http://127.0.0.1:8000/dev/default/user/login?_next=/dev/default/TABLE
>> >>
>> >> Could it be import urllib that failed?
>> >>
>> >> Jonhy
>> >>
>> >> 2010/6/10 Jean Guy <jean...@gmail.com>
>> >>>
>> >>> The redirect those not work out of the box...
>> >>>
>> >>> Jonhy
>> >>>
>> >>> 2010/6/10 Jean Guy <jean...@gmail.com>
>> >>>>
>> >>>> You are a nice guy!
>> >>>>
>> >>>>
>> >>>> Thank you.
>> >>>>
>> >>>> Jonhy
>> >>>>
>> >>>> 2010/6/10 Doug Warren <doug.war...@gmail.com>
>> >>>>>
>> >>>>> 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 complete with whitelist.  I threw it up
>> on
>> >>>>> my blog in case anyone is interested (
>> >>>>> http://dougwarren.org/2010/06/controller-wide-auth-in-web2py/ )  If
>> >>>>> there's a better way to handle this, I'd love to hear it :)
>> >>>>
>> >>>
>> >>
>> >
>> >
>>
>
>

Reply via email to