Manera, Villiam
vmanera at manord.com
Thu Oct 30 12:26:31 EST 2003
try this: sess = Session.Session(req) sess.save() ..... -----Messaggio originale----- Da: Olivier Migeon [mailto:olivier at phgroup.com] Inviato: giovedì 30 ottobre 2003 11.36 A: mod_python at modpython.org Oggetto: [mod_python] session mechanism in 3.1.0a Hi all, I can't understand how the session mechanism works. I'm using the publisher handler, my configuration is Apache/2.0.47 (Win32) mod_python/3.1.0a Python/2.3.2 and I have this code : ** module test.py ** from mod_python import Session def main(req): sess = Session.Session(req) if sess.is_new(): return "I'm a new session, my id is : " + str(sess.id()) else: return "I'm NOT a new session, my id is :" + str(sess.id()) ** end of module test.py *** Now, if I load test.py/main and reload it with the "reload page" button of my browser, I always get a new session. I may be tottaly wrong in some way, but this is not what I except. Any idea ? Thanks for any help. Olivier Migeon _______________________________________________ Mod_python mailing list Mod_python at modpython.org http://mailman.modpython.org/mailman/listinfo/mod_python
|