On Monday, July 29, 2019 at 11:29:09 PM UTC-7, Kimus wrote: > > Ola estou com um problema , estou trabalhando com um template usando > bootstrap (peguei na net ) diferente do web2py logo tenho que fazer td na > mão e até msm inventar as coisas pra fazer acontecer, e agora estou com um > problem, tenho um controllor chamado template e nele em uma das funções eu > uso o decorator @auth.requires_login() funciona , só que ele redireciona > parao controler default/user/login eeu quero que ele redifrecione pra outro > controler, teria como editar essa decorator para isso ?? >
[Per Google Translate, you're using a different template for your views, and you have some controller functions decorated with "@auth.requires_login()", and you don't want to redirect to default/user/login. Why do you want to redirect to another controller or function, rather than giving your user a chance to login? If you want to use a different login method than the "out of the box" method, then you should be reading Chapter 9 on Access Control. That's also where you will find the information about the settings auth.settings.login_url and auth.settings.on_failed_authorization. <URL:http://web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages> Good luck! /dps -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/7c5d5f37-435d-4708-9a86-415f79dba0c2%40googlegroups.com.

