On 1/4/07, percious <[EMAIL PROTECTED]> wrote:
My problem is that I am trying to store the progress in a session
variable so each user has their own particular progress. Later on I
will probably expand this in case the same user has multiple progress
bars...
The problem I am having is that cherrypy does not see the updates to
the 'progress' variable in the session. Here is my sample controller:
I'm certainly not an expert on this, but I beleive that CherryPy
stores the session for each request in a thread-local dictionary, so
probably - inside the workder thread cherrypy.session is something
different.
You could keep a global dict, and in progressPage - select some
identifier that doesn't appear in the dict and pass that down to the
template. Then make the js in the template send this id when it
requests getProgress - which in turn looks that up in the dict. You
would have to find some suitable place to clear out the value too.
This would also allow you to define many simultaneous progress reports
for a session. However, I'm just improvising now :o)
Arnar
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---