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
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')
2 matches
Mail list logo