﻿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
20699	Extra blank choice '-----' when using models.fields.NullBooleanField with custom choices.	tomas.krajca@…	nobody	"When I define my model class Test like below:

{{{
NULL_CHOICES = (
    (None, 'Not applicable'),
    (False, 'Incomplete'),
    (True, 'Complete'),
)

class Test(models.Model):
    t = models.NullBooleanField(choices=NULL_CHOICES, default=False)
}}}

The default admin/model form renders t with four options, as if the choices were like:
(('', '-----'), (None, 'Not applicable'), (False, 'Incomplete'), (True, 'Complete'))

I think this happens because django.db.models.fields.Field.formfield adds the 'blank' choice to the choices and then changes the form field class to forms.TypedChoiceField. "	Bug	closed	Database layer (models, ORM)	1.5	Normal	fixed	NullBooleanField extra blank choice	tomas.krajca@…	Accepted	0	0	0	0	0	0
