HOW DO YOU ACCESS SESSION AND COOKIES DATA W/O USING THE REQUEST OBJECT ?

2009-06-01 Thread Rami
I'm trying to access Session's (logged in) user id info from a py function that does not have 'request' object. I can't find an obvious way to access the session or the cookie data NOT through an instantiated request (HttpRequest) obj [the same way for example you can access any Session variable

Re: HOW DO YOU ACCESS SESSION AND COOKIES DATA W/O USING THE REQUEST OBJECT ?

2009-06-01 Thread Alex Gaynor
On Mon, Jun 1, 2009 at 2:38 PM, Rami wrote: > > I'm trying to access Session's (logged in) user id info from a py > function that does not have 'request' object. I can't find an obvious > way to access the session or the cookie data NOT through an > instantiated request (HttpRequest) obj [the s

Re: HOW DO YOU ACCESS SESSION AND COOKIES DATA W/O USING THE REQUEST OBJECT ?

2009-06-02 Thread akaariai
On 1 kesä, 22:38, Rami wrote: > I'm trying to access Session's (logged in) user id info from a py > function that does not have 'request' object. You could write up something similar to get_language() in utils.translation or use threadlocals. I don't know if this is actually a good idea. --~--

Re: HOW DO YOU ACCESS SESSION AND COOKIES DATA W/O USING THE REQUEST OBJECT ?

2009-06-02 Thread Rami
I know but, then again the set value for the language is only retrievable from a request obj. Thanks. On Jun 2, 1:03 pm, akaariai wrote: > On 1 kesä, 22:38, Rami wrote: > > > I'm trying to access Session's (logged in) user id info from a py > > function that does not have 'request' object. > >