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
@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
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')
3 matches
Mail list logo