I have to connect to a database known only at runtime, I create the model on the fly, but it is not thread safe, so I thought<http://it.dicios.com/enit/thought>that a possible solution could be to give to the model the name of the session_id, but I believe that there is a better solution, how do you think a thing like that should be done?
2014/1/7 Anthony <abasta...@gmail.com> > What exactly do you need to do? > > > On Tuesday, January 7, 2014 1:39:04 PM UTC-5, Giuseppe D'Amico wrote: > >> what if someone does not do the logout, but for some reason the session >> end? >> >> >> 2014/1/7 Giuseppe D'Amico <damicogi...@gmail.com> >> >>> thanks I will do like you say >>> >>> >>> 2014/1/7 Alan Etkin <spam...@gmail.com> >>> >>>> El martes, 7 de enero de 2014 14:40:38 UTC-3, Giuseppe D'Amico escribió: >>>> >>>>> Hi, I am new with web2py, is there a way to intercept the closing of >>>>> a session? >>>>> >>>> >>>> You mean you want to catch a user logout from the scaffolding app? >>>> >>>> You could modify the user action at controllers.py so it checks wether >>>> the "logout" action was asked: >>>> >>>> def user(): >>>> if request.args[0] == "logout": >>>> <do something> >>>> >>>> There's also the auth.settings.logout_onlogout which can be a function >>>> that receives auth.user as argument (undocumented) and >>>> auth.settings.logout_next (a URL for redirection after logout). >>>> >>>> -- >>>> 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 a topic in the >>>> Google Groups "web2py-users" group. >>>> To unsubscribe from this topic, visit https://groups.google.com/d/ >>>> topic/web2py/rzS37obsTI4/unsubscribe. >>>> To unsubscribe from this group and all its topics, 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 a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/rzS37obsTI4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.