From dbe6b6221e980a0fd45aaccd268532ab6500c9df Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 12 Apr 2020 15:50:39 -0400 Subject: added new category model --- .../migrations/0003_category_pluralized_name.py | 18 ++++++++++++++++++ app/taxonomy/models.py | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 app/taxonomy/migrations/0003_category_pluralized_name.py (limited to 'app/taxonomy') diff --git a/app/taxonomy/migrations/0003_category_pluralized_name.py b/app/taxonomy/migrations/0003_category_pluralized_name.py new file mode 100644 index 0000000..a8c9586 --- /dev/null +++ b/app/taxonomy/migrations/0003_category_pluralized_name.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.2 on 2020-04-07 13:35 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('taxonomy', '0002_auto_20191007_0913'), + ] + + operations = [ + migrations.AddField( + model_name='category', + name='pluralized_name', + field=models.CharField(max_length=60, null=True), + ), + ] diff --git a/app/taxonomy/models.py b/app/taxonomy/models.py index 9479a7f..4db3294 100644 --- a/app/taxonomy/models.py +++ b/app/taxonomy/models.py @@ -27,8 +27,9 @@ class TaggedItems(GenericTaggedItemBase): class Category(models.Model): """ Generic model for Categories """ name = models.CharField(max_length=250) - color_rgb = models.CharField(max_length=20, blank=True) + pluralized_name = models.CharField(max_length=60, null=True) slug = models.SlugField(blank=True) + color_rgb = models.CharField(max_length=20, blank=True) date_created = models.DateTimeField(blank=True, auto_now_add=True, editable=False) date_updated = models.DateTimeField(blank=True, auto_now=True, editable=False) -- cgit v1.2.3-70-g09d2