From 69ca220b5e05d7c45bf3ca481d1f20bde37bbd25 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sat, 20 Jun 2015 10:19:11 -0500 Subject: [PATCH] facts: add fact source back into model it was silly for me to have dropped this --- .../migrations/0003_auto_20150620_1018.py | 24 +++++++++++++++++++ dr_botzo/facts/models.py | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 dr_botzo/facts/migrations/0003_auto_20150620_1018.py diff --git a/dr_botzo/facts/migrations/0003_auto_20150620_1018.py b/dr_botzo/facts/migrations/0003_auto_20150620_1018.py new file mode 100644 index 0000000..c4ab2b4 --- /dev/null +++ b/dr_botzo/facts/migrations/0003_auto_20150620_1018.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('facts', '0002_auto_20150521_2224'), + ] + + operations = [ + migrations.AddField( + model_name='fact', + name='nickmask', + field=models.CharField(default='', max_length=200), + ), + migrations.AddField( + model_name='factcategory', + name='show_source', + field=models.BooleanField(default=False), + ), + ] diff --git a/dr_botzo/facts/models.py b/dr_botzo/facts/models.py index b16e171..0f36f2a 100644 --- a/dr_botzo/facts/models.py +++ b/dr_botzo/facts/models.py @@ -16,6 +16,7 @@ class FactCategory(models.Model): """Define categories for facts.""" name = models.CharField(max_length=200, unique=True) + show_source = models.BooleanField(default=False) class Meta: verbose_name_plural = 'fact categories' @@ -54,6 +55,7 @@ class Fact(models.Model): fact = models.TextField() category = models.ForeignKey(FactCategory) + nickmask = models.CharField(max_length=200, default='') objects = FactManager()