Re: [web2py] Re: Storing class instances in sessions... or somewhere

2012-03-31 Thread Michele Comitini
It seems to me that you store only the class when you instantiate it the first time. Try the following to force reserialization: def debug3(): print counter: %s, counter2: %s len: %s%(session.counter,session.counter2, len(session.defManager.allDefs)) defManager = session.defManager

[web2py] Re: Storing class instances in sessions... or somewhere

2012-03-30 Thread Web2py Newbie
On Friday, 30 March 2012 14:38:39 UTC+11, Limedrop wrote: M. Picking might not be the issue. I would try to take javascript out of the equation first. What if you simulated the javascript in a second server-side controller? See if it can retrieve, update and save the session? I

[web2py] Re: Storing class instances in sessions... or somewhere

2012-03-30 Thread Web2py Newbie
session doesn't seem to have a force an update to me method, so I am just incrementing a counter.

[web2py] Re: Storing class instances in sessions... or somewhere

2012-03-30 Thread Massimo Di Pierro
Can I see the object that you are storing in session? On Friday, 30 March 2012 01:09:09 UTC-5, Web2py Newbie wrote: session doesn't seem to have a force an update to me method, so I am just incrementing a counter.

[web2py] Re: Storing class instances in sessions... or somewhere

2012-03-30 Thread Web2py Newbie
I meant a simplified version which acts the same way

[web2py] Re: Storing class instances in sessions... or somewhere

2012-03-29 Thread Limedrop
If instances are pickable then you should be okay. Have you tried saving them to the session and seeing what happens? Note that sometimes you can pickle things okay but the unpickle throws the error. Failing that have a look at the recipe near the bottom of this thread...

[web2py] Re: Storing class instances in sessions... or somewhere

2012-03-29 Thread Web2py Newbie
On Friday, 30 March 2012 12:04:05 UTC+11, Limedrop wrote: If instances are pickable then you should be okay. Have you tried saving them to the session and seeing what happens? Note that sometimes you can pickle things okay but the unpickle throws the error. Have you tried saving them to

[web2py] Re: Storing class instances in sessions... or somewhere

2012-03-29 Thread Limedrop
M. Picking might not be the issue. I would try to take javascript out of the equation first. What if you simulated the javascript in a second server-side controller? See if it can retrieve, update and save the session? On Friday, March 30, 2012 3:07:59 PM UTC+13, Web2py Newbie wrote: