Refs #31369 -- Improved hint message in NullBooleanField's deprecation warning.
This commit is contained in:
parent
506f93f0c3
commit
3b62d8c83e
@ -2248,7 +2248,7 @@ class NullBooleanField(BooleanField):
|
|||||||
"NullBooleanField is removed except for support in historical "
|
"NullBooleanField is removed except for support in historical "
|
||||||
"migrations."
|
"migrations."
|
||||||
),
|
),
|
||||||
"hint": "Use BooleanField(null=True) instead.",
|
"hint": "Use BooleanField(null=True, blank=True) instead.",
|
||||||
"id": "fields.E903",
|
"id": "fields.E903",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -821,7 +821,7 @@ Miscellaneous
|
|||||||
:class:`~django.db.models.expressions.RawSQL` instead beforehand.
|
:class:`~django.db.models.expressions.RawSQL` instead beforehand.
|
||||||
|
|
||||||
* The ``NullBooleanField`` model field is deprecated in favor of
|
* The ``NullBooleanField`` model field is deprecated in favor of
|
||||||
``BooleanField(null=True)``.
|
``BooleanField(null=True, blank=True)``.
|
||||||
|
|
||||||
* ``django.conf.urls.url()`` alias of :func:`django.urls.re_path` is
|
* ``django.conf.urls.url()`` alias of :func:`django.urls.re_path` is
|
||||||
deprecated.
|
deprecated.
|
||||||
|
@ -59,7 +59,7 @@ class DeprecatedFieldsTests(SimpleTestCase):
|
|||||||
checks.Error(
|
checks.Error(
|
||||||
"NullBooleanField is removed except for support in historical "
|
"NullBooleanField is removed except for support in historical "
|
||||||
"migrations.",
|
"migrations.",
|
||||||
hint="Use BooleanField(null=True) instead.",
|
hint="Use BooleanField(null=True, blank=True) instead.",
|
||||||
obj=NullBooleanFieldModel._meta.get_field("nb"),
|
obj=NullBooleanFieldModel._meta.get_field("nb"),
|
||||||
id="fields.E903",
|
id="fields.E903",
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user