Hello everybody, I'm new to this list (and new to Turbogears and almost new
to Python).
I'm Using Turbogears to write small Intranet/Facebook thingy.
For this I planned on using the identity framework i TG. I have however run
in to some oddities. On a page in the app the user can change some profile
settings, like their email, favorite cellphone, etc. The properties are
attached to the User entity and since i have acess to the current user
through 'identity.current.user' I made the code display and work on this
object.
Some thing like this:
@identity.require(identity.not_anonymous())
def updateExt(self, prop1=None, prop2=None, prop3=None, prop4=None,
prop5=None, prop6=None):
if prop1 != None:
identity.current.user.fav1 = prop1
........
This work fine. Changes go to the database and the correct values are shoved
on the response page. But if the user reloads the page or navigates back to
the page through a link. The old values appear on the page. Actually if
changes have been made several time. Refreshing several times will present
several of the states the user object has been in.
Since cherrypy is multi threaded, could it be that each thread has it own
version of the user object? If that is on purpose, what am I doing wrong.
How should I update the user object?
I'm running TG 1.0.4b and SQLObject 0.9.1.
Thank in advance for any replies
Cheers
Tonny
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---