NullBooleanField is deprecated and will be removed a future version of Django.
NullBooleanField is like BooleanField with null=True.
Historically the only values BooleanField accepted was True and False. BooleanField didn't permit null=True. If null was a valid value then NullBooleanField was used instead.
So in practice, do this
class SomeModel(models.Model): some_field = models.BooleanField(null=True)
Instead of this
class SomeModel(models.Model): some_field = models.NullBooleanField()
pip install django-doctor.
Django Doctor will run this check by default. No configuration is needed but the check can be turned on/off using check code
deprecated-nullboolean-field in your pyproject.toml file.