2009/11/12 Monika Sulik <monikasu...@e.pl>:
> As I haven't had any replies so far, I'll add some more information...
>
> The empty label appears if I redefine the form like this:
>
> class CompetitionSearchForm(forms.ModelForm):
>    class Meta:
>        model = Competition
>        fields = ('name','type')
>
> It disappears again if I make the changes I need to on the fields
> (i.e. "unrequire" them):
>
> class CompetitionSearchForm(forms.ModelForm):
>    name = forms.CharField(required=False)
>    type = forms.ChoiceField(choices=COMPETITION_TYPE_CHOICES,
> required=False)
>    class Meta:
>        model = Competition
>        fields = ('name','type')
>
> Should I be defining my type field somehow differently? Or is this a
> bug in Django that I should report?
>

What does model Competition look like?
Do you have choices defined in your models.py and use choices argument
when creating that field in models?

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=.


Reply via email to