Fixed #6212 -- Give models.NullBooleanField the right default newforms field. Patch from SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6935 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
931764ddb5
commit
9229c34163
|
@ -906,6 +906,11 @@ class NullBooleanField(Field):
|
|||
def get_manipulator_field_objs(self):
|
||||
return [oldforms.NullBooleanField]
|
||||
|
||||
def formfield(self, **kwargs):
|
||||
defaults = {'form_class': forms.NullBooleanField}
|
||||
defaults.update(kwargs)
|
||||
return super(NullBooleanField, self).formfield(**defaults)
|
||||
|
||||
class PhoneNumberField(IntegerField):
|
||||
def get_manipulator_field_objs(self):
|
||||
return [oldforms.PhoneNumberField]
|
||||
|
|
Loading…
Reference in New Issue