﻿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
10549	BooleanField.formfield() does not handle choices correct. [PATCH]	Sebastian Noack	nobody	"If you have a BooleanField, with choices (as in the example below), the formfield() method always returns a TypedChoicesField, with a blank choice at the beginning. This is because of this entry is included always if the blank is True and BooleanFields are always blank=True. So we have to check for null instead of blank, when using BooleanFields, since the blank flag in the BooleanfField does not specify if the field can be empty in forms in contrast to other fields.

{{{
FLAG_CHOICES = (
    (0, _('No'),
    (1, _('Yes'),
)

class Foo(models.Model):
    flag = models.BooleanField(choices=FLAG_CHOICES)
}}}
"		closed	Database layer (models, ORM)	1.0		fixed			Accepted	1	0	0	0	0	0
