Re: [web2py] too many redirect during checking condition

2011-04-05 Thread Stifan Kristi
it clear for me right now, thank you so much On Wed, Apr 6, 2011 at 7:02 AM, Martín Mulone wrote: > @auth.requires_login() > def index(): >return dict(message=T('Hello World')) > > 2011/4/5 黄祥 > >> hi, >> >> i want to use condition that if user not log in will redirect to login >> page, and

Re: [web2py] too many redirect during checking condition

2011-04-05 Thread Martín Mulone
@auth.requires_login() def index(): return dict(message=T('Hello World')) 2011/4/5 黄祥 > hi, > > i want to use condition that if user not log in will redirect to login > page, and if logged in will redirect to index page, heres my > controller : > > if not session.authorized: >redirect

[web2py] too many redirect during checking condition

2011-04-05 Thread 黄祥
hi, i want to use condition that if user not log in will redirect to login page, and if logged in will redirect to index page, heres my controller : if not session.authorized: redirect(URL('user')) else: redirect(URL('index')) def index(): return dict(message=T('Hello World')