From 4bf0c7e260f934eb9830866a1e00fecf803ccd6c Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sat, 11 Feb 2017 09:21:18 -0600 Subject: [PATCH] facts: boolean to display facts items in view carried over from the choices functionality that always does this, make this an option for the FactCategory for when we have views bss/dr.botzo#15 --- .../0006_factcategory_show_all_entries.py | 20 +++++++++++++++++++ facts/models.py | 1 + 2 files changed, 21 insertions(+) create mode 100644 facts/migrations/0006_factcategory_show_all_entries.py diff --git a/facts/migrations/0006_factcategory_show_all_entries.py b/facts/migrations/0006_factcategory_show_all_entries.py new file mode 100644 index 0000000..b324817 --- /dev/null +++ b/facts/migrations/0006_factcategory_show_all_entries.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.5 on 2017-02-11 15:00 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('facts', '0005_auto_20150814_1653'), + ] + + operations = [ + migrations.AddField( + model_name='factcategory', + name='show_all_entries', + field=models.BooleanField(default=False), + ), + ] diff --git a/facts/models.py b/facts/models.py index dd2a60f..5a70e21 100644 --- a/facts/models.py +++ b/facts/models.py @@ -11,6 +11,7 @@ class FactCategory(models.Model): """Define categories for facts.""" name = models.CharField(max_length=200, unique=True) + show_all_entries = models.BooleanField(default=False) show_source = models.BooleanField(default=False) class Meta: