Not sure I understand. You need only one
> def user ():
> return dict(form=auth())
If you need to decorate lots of functions with @auth.requires_login(),
you can do
if not request.function in ['index','other_allowed_function'] and not
auth.is_logged_in():
redirect(URL(r=request,f='user/login'))
On Jul 6, 12:59 pm, Jose <[email protected]> wrote:
> How I use the decorators of auth in multiple controllers without
> having to declare in every controller:
>
> def user ():
> return dict(form=auth())
>
> Though to do it is troublesome, also I must duplicate the view "user".
>
> I imagine that there must be a simpler way.
>
> Regards
> Jose
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---