save skunk session manually if it holds objects other than primitive values

"Ren Bing" <[email protected]>
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
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.

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.

Regards

Bing Ren



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.