James,
Thanks, this is great.  I never made this connection before.  I have  
been using threadlocals for a while (to implement a custom manager  
with role-based access).  Since the start I have been passing a users  
role as a kw argument in to the Manager via the shell for testing, and  
until now it never dawned on me that I could just do that in my views!
Thanks again
-richard

On May 19, 2008, at 4:17 PM, James Bennett wrote:

>
> On Mon, May 19, 2008 at 4:10 PM, Tim Chase
> <[EMAIL PROTECTED]> wrote:
>> It's the last bit that can throw folks...many folks seem to use
>> very nice/helpful bits of the framework that abstract the save()
>> call so it's never thought-about.  Wouldn't adding a parameter to
>> save() stymie the admin and a number of other places that call
>> save() without parameters?
>
> Well, for years now I've been telling anyone who will listen that
> auto-filling a foreign key in the admin like this is generally a bad
> idea; if you don't trust your site administrators to fill out the form
> properly, you've got much bigger problems. Plus, newforms-admin makes
> the whole thing moot, and just as 99% of post-queryset-refactor code
> I've seen has ignored everything except model inheritance (arguably
> one of the *less* interesting new features), I expect 99% of
> post-newforms-admin code will ignore the interesting feature and
> simply turn out to be "automatically fill in the user" tricks.
>
> Meanwhile, in public-facing forms for general (i.e., not necessarily
> trusted) users, it's ridiculously easy to automatically fill in a
> foreign key automatically.
>
>
> -- 
> "Bureaucrat Conrad, you are technically correct -- the best kind of  
> correct."
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to