[Twisted-web] How to kill the session

Alberto Trujillo alberto.trujillo at ucd.ie
Wed Dec 7 09:45:11 MST 2005


That is what I was looking for. Thank you very much. I'm goin to try it.

Bye

Paul Reznicek wrote:

> Alberto Trujillo wrote:
>
>> There is any way to kill all the session in Nevow? I mean, I'm 
>> loading a lot of variables in the session, and some times I need to 
>> get the session clear again, and it's very tedious set each variable 
>> to None. So if I coud kill all the session just with one sentences, 
>> or get a new one clean than replace the existing one, would be very 
>> helpfull for me.
>
>
> Quite easy:
>   session = inevow.ISession(ctx)
>   session.expire()
>   return url.here.up()   # or anything else to switch to the login page
>
> Good luck,
> Paul
>
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web





More information about the Twisted-web mailing list