summaryrefslogtreecommitdiff
path: root/tests/model_formsets
diff options
context:
space:
mode:
authorAlasdair Nicol <alasdair@thenicols.net>2013-08-11 21:19:09 +0100
committerTim Graham <timograham@gmail.com>2013-08-15 20:33:02 -0400
commit919934602fd2767024126e094d33f0ad64947270 (patch)
tree562200340750d4f52d8eaa287de879971f54ece5 /tests/model_formsets
parent7825fb878873bfab6762ce001b0446f3ebfb25ea (diff)
[1.6.x] 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. Backport of 22c6497f99 from master
Diffstat (limited to 'tests/model_formsets')
-rw-r--r--tests/model_formsets/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/model_formsets/models.py b/tests/model_formsets/models.py
index ae152448ab..adeb3455a4 100644
--- a/tests/model_formsets/models.py
+++ b/tests/model_formsets/models.py
@@ -117,7 +117,7 @@ class OwnerProfile(models.Model):
@python_2_unicode_compatible
class Restaurant(Place):
- serves_pizza = models.BooleanField()
+ serves_pizza = models.BooleanField(default=False)
def __str__(self):
return self.name
@@ -141,11 +141,11 @@ class Price(models.Model):
unique_together = (('price', 'quantity'),)
class MexicanRestaurant(Restaurant):
- serves_tacos = models.BooleanField()
+ serves_tacos = models.BooleanField(default=False)
class ClassyMexicanRestaurant(MexicanRestaurant):
restaurant = models.OneToOneField(MexicanRestaurant, parent_link=True, primary_key=True)
- tacos_are_yummy = models.BooleanField()
+ tacos_are_yummy = models.BooleanField(default=False)
# models for testing unique_together validation when a fk is involved and
# using inlineformset_factory.