From 60315f51f68f576bb8ea7c6412a00f64f4da9c3b Mon Sep 17 00:00:00 2001 From: Sonika Baniya Date: Mon, 3 May 2021 13:31:08 +0545 Subject: [PATCH] edit insights page - [x] changed insights model from boolfield to charfield --- content/migrations/0049_auto_20210503_0735.py | 18 ++++++++++++++++++ content/models.py | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 content/migrations/0049_auto_20210503_0735.py diff --git a/content/migrations/0049_auto_20210503_0735.py b/content/migrations/0049_auto_20210503_0735.py new file mode 100644 index 0000000..e56fbdf --- /dev/null +++ b/content/migrations/0049_auto_20210503_0735.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.7 on 2021-05-03 07:35 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('content', '0048_merge_20210416_0530'), + ] + + operations = [ + migrations.AlterField( + model_name='insightspage', + name='featured', + field=models.CharField(choices=[(True, 'Yes'), (False, 'No')], default=False, max_length=15, verbose_name='Featured ?'), + ), + ] diff --git a/content/models.py b/content/models.py index 15b6077..84d7547 100644 --- a/content/models.py +++ b/content/models.py @@ -46,7 +46,9 @@ class InsightsPage(Page): ) BOOL_CHOICES = ((True, "Yes"), (False, "No")) - featured = models.BooleanField("Featured ?", choices=BOOL_CHOICES, blank=False, null=False, default=False) + featured = models.CharField( + "Featured ?", choices=BOOL_CHOICES, blank=False, null=False, default=False, max_length=15 + ) country = models.ForeignKey( Country, null=True, blank=False, on_delete=models.SET_NULL, default=1, related_name="+"