Re: using threadlocals to get current user outside views

2008-04-03 Thread Mike Axiak
I wouldn't use it. For the admin, I find myself using javascript just fine to do what I want. I usually have a middleware that sets the current user id as a cookie, then run something like the following javascript in the admin on window load: (requires jquery with cookie plugin) /* Highlight

using threadlocals to get current user outside views

2008-04-03 Thread Aljosa Mohorovic
i'm using admin app and found myself in situation where i need to store current user when saving item so i've overwritten save method on model and with threadlocals middleware fetched current user. threadlocals middleware url: http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser is thi