[mod_python] sessions

Hector Muñoz hectormunozh at gmail.com
Wed Nov 5 18:00:00 EST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

I want to store in a session a list:

session = Session.Session(req)
list = []
session['list'] = list
session.save()

After this, I want to append values in list in other function:

session = Session.Session(req)
list = session['list']
list.append(value)
session['list'] = list
session.save()

And in other function I want to access to ALL values

session= Session.Session(req)
list = session['list']
for value in list:
    ....

But there is only a value when I appended more.

How can I recovery all values that I append?

Thanks!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkSJXAACgkQkXQuTK97GwMbdQCfagcXlqow0BeU3g1zTsWvmtaa
lFoAniAJ7e+d967sbdfTJaxoidypBypp
=Bwmr
-----END PGP SIGNATURE-----



More information about the Mod_python mailing list