Re: Validation Problem with ModelChoiceField

2008-06-27 Thread TiNo
Looking at the source, ModelChoiceField validates the given id against the initial queryset, where you provided an empty one. "models.Gallery.objects.none()" So no id's validate. I think changing none() to all() should make it work. TiNo On Jun 26, 9:01 pm, mwebs <[EMAIL PROTECTED]> wrote: > Hel

Validation Problem with ModelChoiceField

2008-06-26 Thread mwebs
Hello, I have a serious validation problem with a form using a ModelSchoiceField. Forms: class MyModelChoiceField(forms.ModelChoiceField): def label_from_instance(self, obj): return "%s" % obj.name class PictureForm(forms.Form): image = forms.ImageField(label='Picture')