[Twisted-web] Sessions and stored objects

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Thu May 13 09:55:26 EDT 2010

On 11 May, 07:03 pm, oscar.campos at open-phoenix.com wrote:
>I'm storing User objects in my sessions, those User objects can perform 
>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 
>the Session object and this works nice using the notufyOnExpire 
>but I'm just curious.
>Is there any way that I can call Session methods from store session 

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.
>Oscar Campos Ruiz-Adame -oscar.campos at open-phoenix.com
>Consultor - Consultant
>Open Phoenix IT Consultoría Tecnológica - IT Consulting
>Tel. +34 644569088

More information about the Twisted-web mailing list