On 24 авг, 23:56, "Patrick J. Anderson" <[EMAIL PROTECTED]>
wrote:
> How should I limit choices for ForeignKey fields in admin.ModelAdmin
> instances based on request.user attributes, since I can't pass a request
> object to the forms.ModelForm constructor?

You can use ThreadLocals middleware 
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
to get current user

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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