changeset 162:27b38cc65ca4

Set defaults for BooleanFields. THis suppresses a warning in Django 1.7 since the default changed in Django 1.6.
author Brian Neal <bgneal@gmail.com>
date Thu, 02 Apr 2015 19:03:46 -0500
parents e73a108189fe
children 7fc4123fef70
files band/models.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/band/models.py	Thu Apr 02 18:57:16 2015 -0500
+++ b/band/models.py	Thu Apr 02 19:03:46 2015 -0500
@@ -15,7 +15,7 @@
     photo = models.ImageField(upload_to='images/bio/', blank=True)
     order = models.SmallIntegerField(
         help_text = "Controls order of display; lower numbers displayed first")
-    is_active = models.BooleanField()
+    is_active = models.BooleanField(default=True)
     start_date = models.DateField()
     end_date = models.DateField(blank=True,
         null=True,
@@ -101,7 +101,7 @@
     name = models.CharField(max_length=64)
     desc = models.TextField()
     price = models.DecimalField(max_digits=5, decimal_places=2)
-    in_stock = models.BooleanField()
+    in_stock = models.BooleanField(default=True)
     photo = models.ForeignKey(Photo)
 
     def __unicode__(self):