Re: save skunk session manually if it holds objects other than primitive values
Jacob Smullyan <[email protected]>
| Newsgroups | gmane.comp.web.skunkweb |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Oct 25, 2004 at 05:18:41PM +0800, Ren Bing wrote: > Hi, > > I just found that if you save objects other than simple primitive values > (int, str, numbers, etc), but a dict, or perhaps other class instances into > session, and if you changed members of them, you have to manually call > session.save() before finish processing the request. I checked the > Session.py source code, and found that unless you update the session like > "session[xxx] = xxx" or "del session[xxx]", the session won't get 'dirty'. > That is, "session[xxx][xxx] = xxx" or "session[xxx].xxx = xxx" won't mark > the session 'dirty', thus it won't be saved. Yes. This is the same problem you have with shelf objects, ZODB, etc. > This is OK for me, however, if my understand is correct, I suggest to add a > line in the document to explain this, so user won't be confused. +1. js -- Jacob Smullyan
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBfQBruqamFyFXXLIRAgWyAKDKCP5G5ZE+PjNfst1mz6bnrlk/lwCfXFZd vohn9yWOB/UwxKSUOTVTGT4= =z1A/ -----END PGP SIGNATURE-----