Hi,
I have the following problem... I've got a form, which looks like
this:
class CompetitionSearchForm(forms.Form):
name = forms.CharField(required=False)
type = forms.ChoiceField(choices=COMPETITION_TYPE_CHOICES,
required=False)
The tuple COMPETITION_TYPE_CHOICES is used in a model class (the
purpose of the form is to search through Competition objects). It
looks something a bit like this:
COMPETITION_TYPE_CHOICES = (
(1, 'Olympic Games'),
(2, 'ISU Championships'),
(3, 'Grand Prix Series'),
)
I'd like the select widget in ChoiceField to display an empty label.
According to the documentation (
http://docs.djangoproject.com/en/dev/
ref/forms/fields/#choicefield), it seems like this should happen by
default, but I don't get an empty value in the select widget at all.
Why is this?
Monika