Re: Accessing request.user inside a model methods

2007-11-17 Thread Samuel Adam
http://lucumr.pocoo.org/blogarchive/why-i-cant-stand-threadlocal-and-others On Nov 17, 10:20 am, DanB <[EMAIL PROTECTED]> wrote: > Thxs Alex, > > really helpful info. > > Cheers, > DanB > > On Nov 16, 7:04 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > >

Re: Accessing request.user inside a model methods

2007-11-17 Thread DanB
Thxs Alex, really helpful info. Cheers, DanB On Nov 16, 7:04 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser > > On 16 нояб, 20:07, "Dan-Cristian Bogos" <[EMAIL PROTECTED]> wrote: > > > Hello, > > > Can anyone tell me if it is

Re: Accessing request.user inside a model methods

2007-11-16 Thread Alex Koshelev
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser On 16 нояб, 20:07, "Dan-Cristian Bogos" <[EMAIL PROTECTED]> wrote: > Hello, > > Can anyone tell me if it is possible to access logged user instance > inside a model method, like save() is? > > I need to rewrite save() method, so I

Accessing request.user inside a model methods

2007-11-16 Thread Dan-Cristian Bogos
Hello, Can anyone tell me if it is possible to access logged user instance inside a model method, like save() is? I need to rewrite save() method, so I should have some automatic triggers on model.save(), and use information inside user.groups.all(). Ta, DanB