Monday, December 31, 2018

Form no longer validates after upgrading django from 2.0.5 to 2.1. Should I report a bug?


In our project we have a Model with this field:

    has_drivers_license = models.BooleanField(verbose_name=_('Heeft rijbewijs'), default=False, choices=BOOL_CHOICES)

and we have a ModelForm, where this field is used:

    fields = [... 'has_drivers_license', ]

and we use a radio select widget:

    widgets = {
'has_drivers_license': forms.RadioSelect

Now, in one specific template where we use this form, we don't include this specific field. In the view, the form would validate anyway. After upgrading to django 2.1  (from 2.0.5), this form no longer validates, saying that has_drivers_license is required. 
I have now added "blank = True" to the Model field, after which the form validates again.

Should I report a bug? I didn't see anything in the release notes that would lead to me to expect backward incompatible behavior on this issue.


You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment