diff options
| author | Alasdair Nicol <alasdair@thenicols.net> | 2013-08-11 21:19:09 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-08-15 19:47:26 -0400 |
| commit | 22c6497f990fd12359b759a71abfcbf3f52b2d52 (patch) | |
| tree | c04062583cf2cffabc193e635542fa91d99e163e /tests/admin_views | |
| parent | 55339a76691724109770092976e660ac62358bc5 (diff) | |
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/admin_views')
| -rw-r--r-- | tests/admin_views/models.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/admin_views/models.py b/tests/admin_views/models.py index a1131210d7..c63ac3b927 100644 --- a/tests/admin_views/models.py +++ b/tests/admin_views/models.py @@ -115,7 +115,7 @@ class ModelWithStringPrimaryKey(models.Model): @python_2_unicode_compatible class Color(models.Model): value = models.CharField(max_length=10) - warm = models.BooleanField() + warm = models.BooleanField(default=False) def __str__(self): return self.value @@ -144,7 +144,7 @@ class Actor(models.Model): @python_2_unicode_compatible class Inquisition(models.Model): - expected = models.BooleanField() + expected = models.BooleanField(default=False) leader = models.ForeignKey(Actor) country = models.CharField(max_length=20) @@ -376,7 +376,7 @@ class Link(models.Model): class PrePopulatedPost(models.Model): title = models.CharField(max_length=100) - published = models.BooleanField() + published = models.BooleanField(default=False) slug = models.SlugField() @@ -607,7 +607,7 @@ class PrePopulatedPostLargeSlug(models.Model): the javascript (ie, using THOUSAND_SEPARATOR ends up with maxLength=1,000) """ title = models.CharField(max_length=100) - published = models.BooleanField() + published = models.BooleanField(default=False) slug = models.SlugField(max_length=1000) class AdminOrderedField(models.Model): |
