﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29921	Default BooleanField.required different from Django 2.0 when using choices	Bogdan Batog	nobody	"
Using a BooleanField with choices inside a ModelForm, without explicit blank or null attributes on the model, exhibits different defaults for required attribute on the widget in Django2.1 vs Django2.0. 

The code below prints True in Django2.1.2 and False in Django2.0.6

{{{
class XModel(models.Model):
  result_bool = models.BooleanField(
    choices=(
      (True, 'Positive'),
      (False, 'Negative'),
    ),
    default=False
  )


class XForm(forms.ModelForm):
  class Meta:
    model = XModel
    fields = ['result_bool']


XForm(XModel()).fields['result_bool'].required
}}}
"	Bug	closed	Forms	2.1	Normal	invalid	BooleanField, widget, required		Unreviewed	0	0	0	0	0	1
