summaryrefslogtreecommitdiff
path: root/tests/model_inheritance_regress
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 19:47:26 -0400
commit22c6497f990fd12359b759a71abfcbf3f52b2d52 (patch)
treec04062583cf2cffabc193e635542fa91d99e163e /tests/model_inheritance_regress
parent55339a76691724109770092976e660ac62358bc5 (diff)
downloaddjango-22c6497f990fd12359b759a71abfcbf3f52b2d52.tar.gz
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.
Diffstat (limited to 'tests/model_inheritance_regress')
-rw-r--r--tests/model_inheritance_regress/models.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/model_inheritance_regress/models.py b/tests/model_inheritance_regress/models.py
index 0f45a2cb3f..bf076a47c6 100644
--- a/tests/model_inheritance_regress/models.py
+++ b/tests/model_inheritance_regress/models.py
@@ -18,15 +18,15 @@ class Place(models.Model):
@python_2_unicode_compatible
class Restaurant(Place):
- serves_hot_dogs = models.BooleanField()
- serves_pizza = models.BooleanField()
+ serves_hot_dogs = models.BooleanField(default=False)
+ serves_pizza = models.BooleanField(default=False)
def __str__(self):
return "%s the restaurant" % self.name
@python_2_unicode_compatible
class ItalianRestaurant(Restaurant):
- serves_gnocchi = models.BooleanField()
+ serves_gnocchi = models.BooleanField(default=False)
def __str__(self):
return "%s the italian restaurant" % self.name
@@ -184,7 +184,7 @@ class Station(SearchableLocation):
class BusStation(Station):
bus_routes = models.CommaSeparatedIntegerField(max_length=128)
- inbound = models.BooleanField()
+ inbound = models.BooleanField(default=False)
class TrainStation(Station):
zone = models.IntegerField()