From 22c6497f990fd12359b759a71abfcbf3f52b2d52 Mon Sep 17 00:00:00 2001 From: Alasdair Nicol Date: Sun, 11 Aug 2013 21:19:09 +0100 Subject: Fixed #20895 -- Made check management command warn if a BooleanField does not have a default value Thanks to Collin Anderson for the suggestion and Tim Graham for reviewing the patch. --- tests/custom_managers/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/custom_managers') diff --git a/tests/custom_managers/models.py b/tests/custom_managers/models.py index 44d5eb70da..cba375f4d7 100644 --- a/tests/custom_managers/models.py +++ b/tests/custom_managers/models.py @@ -67,7 +67,7 @@ CustomManager = BaseCustomManager.from_queryset(CustomQuerySet) class Person(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) - fun = models.BooleanField() + fun = models.BooleanField(default=False) objects = PersonManager() custom_queryset_default_manager = CustomQuerySet.as_manager() @@ -80,7 +80,7 @@ class Person(models.Model): class Book(models.Model): title = models.CharField(max_length=50) author = models.CharField(max_length=30) - is_published = models.BooleanField() + is_published = models.BooleanField(default=False) published_objects = PublishedBookManager() authors = models.ManyToManyField(Person, related_name='books') -- cgit v1.3