Richard,
I could fix it changing the following auth.message: auth.messages.ajax_failed_authentication For example: auth.messages.ajax_failed_authentication = DIV(H4(T('Your session has expired')), T('Please '), A(T('login'), _href=auth.settings.login_url + ('?_next=' + urllib.quote(request.env.http_web2py_component_location)) if request.env.http_web2py_component_location else ''), T(' again to view this content.'), _class='not-authorized alert alert-block') El martes, 19 de noviembre de 2013, 18:18:14 (UTC-2), Richard escribió: > > Any solution for this problem? > > Richard > > > On Thu, Sep 19, 2013 at 12:43 PM, Richard Vézina <ml.richa...@gmail.com > <javascript:>> wrote: > >> Nop... auth.settings.login_url work even if user is disconnect. >> >> Richard >> >> >> On Thu, Sep 19, 2013 at 12:31 PM, Richard Vézina <ml.richa...@gmail.com >> <javascript:>> wrote: >> >>> Or db.py auth.settings.login_url = URL(...) is just not executed in case >>> the user is not logged? >>> >>> Richard >>> >>> >>> On Thu, Sep 19, 2013 at 12:27 PM, Richard Vézina <ml.richa...@gmail.com >>> <javascript:>> wrote: >>> >>>> Hello, >>>> >>>> It seems that auth.settings.*login_url* = URL('default', 'user', >>>> args='login', extension=False) works at least in context where the user >>>> access site and get redirect to login page... >>>> >>>> But for some reason, it seems that self.settings.login_url in the code >>>> below : >>>> >>>> messages.update(ajax_failed_authentication=DIV(H4('NOT AUTHORIZED'), >>>> 'Please ', >>>> A('login', >>>> _href=*self.settings.login_url* + >>>> ('?_next=' + >>>> urllib.quote(current.request.env.http_web2py_component_location)) >>>> if current.request.env.http_web2py_component_location >>>> else ''), >>>> ' to view this content.', >>>> _class='not-authorized alert alert-block')) >>>> >>>> Get override or the auth init get call again in context of component >>>> and auth.settings.login_url = URL(...) from db.py is ignored?? >>>> >>>> Richard >>>> >>>> >>>> On Wed, Sep 18, 2013 at 4:32 PM, Richard Vézina <ml.richa...@gmail.com >>>> <javascript:>> wrote: >>>> >>>>> Ok, I miss understand the utility of default_settings, it is not >>>>> initialize the Auth settings list... >>>>> >>>>> I guess we need something like login_next... >>>>> >>>>> Will see what I can do tomorrow... >>>>> >>>>> Richard >>>>> >>>>> >>>>> On Wed, Sep 18, 2013 at 4:01 PM, Richard Vézina <ml.richa...@gmail.com >>>>> <javascript:>> wrote: >>>>> >>>>>> Adding this, after line 928 : >>>>>> url_login = URL(c='default', f='user', args='login') >>>>>> >>>>>> And changing line 1163-1164 for this : >>>>>> url_login = self.default_settings['url_login'] >>>>>> >>>>>> Solve it, thought, I don't know why I don't need >>>>>> auth.settings.url_login = URL(default','user',args='login', >>>>>> extension=False) to make it works properly... >>>>>> >>>>>> So, I guess it not works the way you want it to do... Futher tests >>>>>> are required... >>>>>> >>>>>> Richard >>>>>> >>>>>> >>>>>> On Wed, Sep 18, 2013 at 3:27 PM, Richard Vézina < >>>>>> ml.richa...@gmail.com <javascript:>> wrote: >>>>>> >>>>>>> I think we need to add url_login in Auth init, I get <type >>>>>>> 'exceptions.SyntaxError'> setting key 'url_login' does not exist >>>>>>> I try login_url, it don't return ticket but it not working... >>>>>>> >>>>>>> web2py 2.4.7 >>>>>>> >>>>>>> Richard >>>>>>> >>>>>>> >>>>>>> On Wed, Sep 18, 2013 at 3:21 PM, Richard Vézina < >>>>>>> ml.richa...@gmail.com <javascript:>> wrote: >>>>>>> >>>>>>>> Right! >>>>>>>> >>>>>>>> That what I thougth to do at first I should had just did that >>>>>>>> instead of fixing something :) >>>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> Richard >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Sep 18, 2013 at 2:54 PM, Massimo Di Pierro < >>>>>>>> massimo....@gmail.com <javascript:>> wrote: >>>>>>>> >>>>>>>>> This cannot be fixed at the level of gluon/tools.py because some >>>>>>>>> users may want an ajax login form. Those users should be free to >>>>>>>>> create a >>>>>>>>> default/user.load view. >>>>>>>>> In your case you simply need to do (in model): >>>>>>>>> >>>>>>>>> auth.settings.url_login = URL('default','user',args='login', >>>>>>>>> extension=False) >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Wednesday, 18 September 2013 08:51:08 UTC-5, Richard wrote: >>>>>>>>> >>>>>>>>>> Adding extention='html' at line 1163 in tools.py seems to solve >>>>>>>>>> the issue : >>>>>>>>>> >>>>>>>>>> url_login = URL(controller, function, args='login', >>>>>>>>>> extension='html') >>>>>>>>>> >>>>>>>>>> Or extension=False >>>>>>>>>> >>>>>>>>>> url_login = URL(controller, function, args='login', >>>>>>>>>> extension=False) >>>>>>>>>> >>>>>>>>>> The latter probably better >>>>>>>>>> >>>>>>>>>> Richard >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Wed, Sep 18, 2013 at 9:37 AM, Richard <ml.richa...@gmail.com> >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Hello, >>>>>>>>>>> >>>>>>>>>>> In case a component trigger a NOT AUTHORIZED popup, the login >>>>>>>>>>> redirect link propagate the .load of the component : >>>>>>>>>>> >>>>>>>>>>> NOT AUTHORIZEDPlease login >>>>>>>>>>> <http://127.0.0.1:8000/sgddms/default/user.load/login?_next=http%3A//127.0.0.1%3A8000/sgddms/default/index%23> >>>>>>>>>>> to >>>>>>>>>>> view this content. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> The link look like that : http://127.0.0.1:8000/app/default/user >>>>>>>>>>> *.load*/login?_next=url... >>>>>>>>>>> >>>>>>>>>>> This occure in web2py 2.4.7 >>>>>>>>>>> >>>>>>>>>>> Richard >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> 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 web2py+un...@googlegroups.com. >>>>>>>>>>> >>>>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out >>>>>>>>>>> . >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>> 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 web2py+un...@googlegroups.com <javascript:>. >>>>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.