Re: Current user in model.save() context

2009-07-21 Thread Bartłomiej Górny
Joshua Russo wrote: > On Mon, Jul 20, 2009 at 9:23 AM, Matthias Kestenholz > mailto:matthias.kestenh...@gmail.com>> > wrote: > > thread locals have all the problems which are generally associated > with global variables. They might be overwritten by other code, they > make testing e

Re: Current user in model.save() context

2009-07-21 Thread Bartłomiej Górny
Matthias Kestenholz wrote: > On Mon, Jul 20, 2009 at 9:26 AM, Bartłomiej Górny wrote: >> [...] >>> there is a cookbook recipe for achieving this sort of thing: >>> >>> http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser >> Yep, that's

Re: Current user in model.save() context

2009-07-20 Thread Bartłomiej Górny
Matthias Kestenholz wrote: > On Fri, Jul 17, 2009 at 4:24 PM, Bartłomiej Górny wrote: >> Phil wrote: >>> Hi Josh, >>> >>> unfortunately it seems that there is no way to do so. As you've >>> noticed that correctly you can use request (request.user)

Re: Current user in model.save() context

2009-07-17 Thread Bartłomiej Górny
Phil wrote: > Hi Josh, > > unfortunately it seems that there is no way to do so. As you've > noticed that correctly you can use request (request.user) in any place > but model save. Yes, I bumped into the same problem and came to the same conclusion. No way. Unless you hack out something along t