If you change the Auth controller from 'default', you must specify that:

auth = Auth(db, controller='autenticacao')

Anthony

On Monday, February 10, 2014 5:27:40 PM UTC-5, Thiago Nobre wrote:
>
> Yeah, it's exactly what's going on and I don't know why. I attached the 
> db.py file and the controllers used on the problem, as you requested.
>
> To be more clear, I'll try to explain again:
>
> The problem is that I want that just some pages are blocked to the 
> visitors, so I can't use @auth.requires_login() in the index function of 
> the default controller. But if I don't use this decorator, when the login 
> is not valid occurs an undesirable redirect to the home page, instead of 
> continue in the login page until the user enters with the correct name and 
> password, or until this one enters like a visitor.
>
> And sorry for the troubles on my confused explanations, it's hard to me 
> speak in english.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to