I have the need to store a few other related variables and derived 
variables.  I will store them as attrs of "c" in the __before__ method 
(where c is "from tg import tmpl_context as c"), and use them in the 
controller methods.  Thanks.


On Monday, September 3, 2012 7:28:17 PM UTC-7, ozwyzard wrote:
>
> Thanks for confirming that it would lead to race conditions.  Agree that 
> one can store request context variables in request or tmpl_context.  Thank 
> you!
>
>
> On Monday, September 3, 2012 3:19:28 PM UTC-7, Alessandro Molina wrote:
>>
>> You can store request specific objects inside the request itself or 
>> inside the tmpl_context object. 
>> Writing controller instance properties can lead to race conditions. 
>>
>> Keep in mind that you already have the user_id always accessible 
>> anyway, request.identity['user'].user_id should retrieve it inside 
>> controllers. 
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/turbogears/-/nSXKoZE6oR0J.
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