Nicolas R. wrote:
> I've written an app assuming that a controller instance would be  
> created for each user.
> So I wrote code like:
> 
> self.server = <the user specific server>
> 
> know, that I know that this messes up big time,

Yep, that's a no-no.

> I would like to know,  
> how you handle situations like that.
> 
> Are you taking along the informations over get/post vars or is there  
> a possibility to attach specific data to identity.current.user ?

Have you read http://docs.turbogears.org/1.0/Sessions? If you use
sessions, you can do something like this:


    cherrypy.session[identity.user.user_name] = user_specific_data

and it will persist across requests. One caveat, if you load-balance
across different servers, either use a database as the session storage,
or have a load-balancer that is session-aware (i.e. can direct
client-requests with the same session always the same server).


HTH, Chris


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to