On Jan 14, 6:39 pm, GoSantoni <[email protected]> wrote:
> Hi
>
> Is it possible to use extra filter on a ModelChoiceField?
>
> Tried several strategies:
>
> if photo.member == user:
>     url = forms.ModelChoiceField(queryset=Image.objects.filter())
>
> or
>     url = forms.ModelChoiceField(queryset=Image.objects.filter
> (member__id=1))
>
> or
>
> if Image.objects.filter(member__id=1):
>      url = forms.ModelChoiceField(queryset=Image.objects.filter
> (member__id=1))
>
> All fail to filter on the member / user
>
> Thanks

Where are you doing this filtering?
--
DR.
-- 
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