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:
committed by
Mariusz Felisiak
parent
34a69c2458
commit
a92cc84b4a
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user