I have stepped through code, and cruised the django docs, forums, and
internet in general looking for how to setup an empty label with
TypedChoiceField (or ChoiceField.) I suspected it would be done
similar to the way it is done with ModelChoiceField.
With ModelChoiceField, we can specify an empty_label. But, with
TypeChoice and Choice you have to put an empty field in our choices
list. And, None doesn't work, it has to be ''.
I have code that is working fine. But, my question is... Is there
any design reason empty_label was not included in the other Choice
fields?
> I have stepped through code, and cruised the django docs, forums, and
> internet in general looking for how to setup an empty label with
> TypedChoiceField (or ChoiceField.) I suspected it would be done
> similar to the way it is done with ModelChoiceField.
> With ModelChoiceField, we can specify an empty_label. But, with
> TypeChoice and Choice you have to put an empty field in our choices
> list. And, None doesn't work, it has to be ''.
> I have code that is working fine. But, my question is... Is there
> any design reason empty_label was not included in the other Choice
> fields?
> > I have stepped through code, and cruised the django docs, forums, and
> > internet in general looking for how to setup an empty label with
> > TypedChoiceField (or ChoiceField.) I suspected it would be done
> > similar to the way it is done with ModelChoiceField.
> > With ModelChoiceField, we can specify anempty_label. But, with
> > TypeChoice and Choice you have to put an empty field in our choices
> > list. And, None doesn't work, it has to be ''.
> > I have code that is working fine. But, my question is... Is there
> > any design reasonempty_labelwas not included in the other Choice
> > fields?