The Alchemist schrieb: > @Diez Thanks > > I am using cherrypy.sesssion['myvar']=value > > Now I need to initialize it at the beginning of the session (i.e. when > the root controller is first called).
No, that's not the start of a session. Session refers to a browser session here, i.e. a user/client identified by a cookie, so a session is only available, when there is a client request. > I am trying to setting it in > the __init__ method but it is throwing an exception (saying > AttributeError: 'thread._local' object has no attribute 'request'). > > How/where shall I initialize the session variable the first time? In an exposed method, for example in "index" or "login". 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 -~----------~----~----~----~------~----~------~--~---

