Session and validate_request()
"Denis Toporov" <[email protected]> Tue, 22 Mar 2005 18:56:29 +0300
| Newsgroups | gmane.comp.web.albatross.general |
|---|---|
| Message-ID | <74077C8AA24C5047AA55164003DFBE8803839DBF@exchange.universe.dart.spb> |
Hi again, it seems like I'm in trouble again:) lets imagine I have modular random session application, and initialize session variables in main script (specified as start_page script in application constructor) in validate_request() method. I hoped that validate_request() called on each request. The problem: if user have no actions for a while, session is dead because of session timeout. And if user try to request after dead session any page he gets an exception, because of session is dead, and no session variables any more. So he got no variable exception trace. The way to avoid this is to put check of session variables existence in each .py module, but this is brute force method. Is any smart solution already exists for this kind of problem? thanks in advance, denis