Greetings. I'm storing User objects in my sessions, those User objects can perform some actions at application if they have permissions in the ACL. When I need to do logout with any of them I just use the expire method from the Session object and this works nice using the notufyOnExpire callback, but I'm just curious. Is there any way that I can call Session methods from store session objects? user.logout() should look nicer. Ty. -- Oscar Campos Ruiz-Adame -oscar.campos@open-phoenix.com Consultor - Consultant Open Phoenix IT Consultoría Tecnológica - IT Consulting _________________________________________________ Tel. +34 644569088 http://www.open-phoenix.com
On 11 May, 07:03 pm, oscar.campos@open-phoenix.com wrote:
Greetings.
I'm storing User objects in my sessions, those User objects can perform some actions at application if they have permissions in the ACL. When I need to do logout with any of them I just use the expire method from the Session object and this works nice using the notufyOnExpire callback, but I'm just curious.
Is there any way that I can call Session methods from store session objects?
The session is a regular Python object (as is everything). You can call methods on it in the usual way.
user.logout() should look nicer.
Ty.
-- Oscar Campos Ruiz-Adame -oscar.campos@open-phoenix.com Consultor - Consultant Open Phoenix IT Consultor�a Tecnol�gica - IT Consulting _________________________________________________ Tel. +34 644569088 http://www.open-phoenix.com
participants (2)
-
exarkun@twistedmatrix.com
-
Oscar Campos