1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #31369 -- Deprecated models.NullBooleanField in favor of BooleanField(null=True).

This commit is contained in:
Tim Schilling
2020-03-30 21:16:33 -05:00
committed by Mariusz Felisiak
parent 34a69c2458
commit a92cc84b4a
7 changed files with 37 additions and 2 deletions

View File

@@ -1929,6 +1929,14 @@ class NullBooleanField(BooleanField):
'invalid_nullable': _('%(value)s” value must be either None, True or False.'),
}
description = _("Boolean (Either True, False or None)")
system_check_deprecated_details = {
'msg': (
'NullBooleanField is deprecated. Support for it (except in '
'historical migrations) will be removed in Django 4.0.'
),
'hint': 'Use BooleanField(null=True) instead.',
'id': 'fields.W903',
}
def __init__(self, *args, **kwargs):
kwargs['null'] = True