changeset 929:e14f54f16dbc

Django 1.7.7 changed BooleanField default value. Add explicit default to avoid a warning.
author Brian Neal <bgneal@gmail.com>
date Wed, 15 Apr 2015 20:18:23 -0500
parents 4d26a46f1b86
children 1b96b7d12269
files contests/models.py donations/models.py smiley/models.py
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contests/models.py	Tue Apr 14 21:28:36 2015 -0500
+++ b/contests/models.py	Wed Apr 15 20:18:23 2015 -0500
@@ -30,7 +30,7 @@
     title = models.CharField(max_length=64)
     slug = models.SlugField(max_length=64)
     description = models.TextField()
-    is_public = models.BooleanField(db_index=True)
+    is_public = models.BooleanField(default=False, db_index=True)
     creation_date = models.DateTimeField(blank=True)
     end_date = models.DateTimeField()
     contestants = models.ManyToManyField(User, related_name='contests',
--- a/donations/models.py	Tue Apr 14 21:28:36 2015 -0500
+++ b/donations/models.py	Wed Apr 15 20:18:23 2015 -0500
@@ -96,7 +96,7 @@
     """Model to represent a donation to the website."""
 
     user = models.ForeignKey(User, null=True, blank=True)
-    is_anonymous = models.BooleanField()
+    is_anonymous = models.BooleanField(default=False)
     test_ipn = models.BooleanField(default=False, verbose_name="Test IPN")
     txn_id = models.CharField(max_length=20, verbose_name="Txn ID")
     txn_type = models.CharField(max_length=64)
--- a/smiley/models.py	Tue Apr 14 21:28:36 2015 -0500
+++ b/smiley/models.py	Wed Apr 15 20:18:23 2015 -0500
@@ -64,7 +64,7 @@
     image = models.ImageField(upload_to='smiley/images/')
     title = models.CharField(max_length=32)
     code = models.CharField(max_length=32)
-    is_extra = models.BooleanField()
+    is_extra = models.BooleanField(default=False)
 
     objects = SmileyManager()