Hello everybody!
When I use models.TextChoices
to create class with choices, with blank=True
, I expect that I can leave this choice field not fillable(with number of dashes). But I can’t. Django raise an error, it want from me to add None
or ''
(blank line) to the list of choices. Like this:
class SomeType(models.TextChoices)
NOT_SELECTED = None, '---------'
FIRST_TYPE, 'first_type', 'first type'
...
Is this correct behaviour? Maybe I miss something? I thought this cases should processed by Django itself.