Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
edit insights page
Browse files Browse the repository at this point in the history
- [x] changed insights model from boolfield to charfield
  • Loading branch information
sonikabaniya committed May 3, 2021
1 parent c3c59b8 commit 60315f5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
18 changes: 18 additions & 0 deletions content/migrations/0049_auto_20210503_0735.py
Original file line number Diff line number Diff line change
@@ -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 ?'),
),
]
4 changes: 3 additions & 1 deletion content/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="+"
Expand Down

0 comments on commit 60315f5

Please sign in to comment.