On Jun 26, 7:53 am, mwebs <[EMAIL PROTECTED]> wrote:
> gallery = forms.ChoiceField(Gallery.objects.filter( ...))

You want to use a ModelChoiceField [1] instead of a ChoiceField. It
takes a QuerySet as an argument::

    class PictureForm(forms.Form):
        ...
        gallery = forms.ModelChoiceField(
            Gallery.objects.filter(...))

.. [1] http://www.djangoproject.com/documentation/newforms/#modelchoicefield
--~--~---------~--~----~------------~-------~--~----~
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