mwebs wrote: > Hello, > > I am trying to do something like this > > class PictureForm(forms.Form): > image = forms.ImageField(label='Picture') > gallery = forms.ChoiceField(Gallery.objects.all()) > > this just works fine, but I only want to pass several Galleries to the > ChoiceField... > something like: > > ... > gallery = forms.ChoiceField(Gallery.objects.filter( ...)) > > so how can I do this? > > Thanks,Toni > > Have a look at ModelChoiceField
http://www.djangoproject.com/documentation/newforms/#fields-which-handle-relationships Regards Ganesh --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---