mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #29227 -- Allowed BooleanField to be null=True.
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
This commit is contained in:
@@ -456,7 +456,7 @@ class Post(models.Model):
|
||||
default=datetime.date.today,
|
||||
help_text="Some help text for the date (with unicode ŠĐĆŽćžšđ)"
|
||||
)
|
||||
public = models.NullBooleanField()
|
||||
public = models.BooleanField(null=True, blank=True)
|
||||
|
||||
def awesomeness_level(self):
|
||||
return "Very awesome."
|
||||
@@ -692,7 +692,7 @@ class OtherStory(models.Model):
|
||||
class ComplexSortedPerson(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
age = models.PositiveIntegerField()
|
||||
is_employee = models.NullBooleanField()
|
||||
is_employee = models.BooleanField(null=True)
|
||||
|
||||
|
||||
class PluggableSearchPerson(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user