auth.settings.login_next='.....'

Massimo

On May 6, 12:17 pm, annet <annet.verm...@gmail.com> wrote:
> In t2 you could do:
>
> @t2.requires_login(next='login')
>
> In tools.py
>
> @auth.requires_login(next='../authtool/login')
>
> doesn't work:
> TypeError: requires_login() got an unexpected keyword argument 'next'
>
> What's the equivalent of t2.requires_login(next='login') in tools.py?
>
> In the online documentation I read:
>
>     In your controller (for example in default.py) expose the auth
> object (for example via a user action)
>
> I created a controller authtool and defined the actions like this:
>
> def register():
>     return dict(form=auth.register())
>
> def login():
>     return dict(form=auth.login(next='../crudtool/index'))
>
> ....
>
> Furthermore I created a controller crudtool in which I will define
> crud actions. When I expose the index function in crudtool:
>
> @auth.requires_login()
> def index():
>     return dict(message="hello from crudtool.py")
>
> it redirects to:http://127.0.0.1:8000/mock/crudtool/user/login, but
> there is no function user and args login. Whereas it should redirect
> me tohttp://127.0.0.1:8000/mock/authtool/loginI thought I would
> solve this using the next attribute...
>
> Kind regards,
> Annet
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to