diff --git a/blog/migrations/0005_blog_is_featured.py b/blog/migrations/0005_blog_is_featured.py new file mode 100644 index 0000000..459139f --- /dev/null +++ b/blog/migrations/0005_blog_is_featured.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.6 on 2022-08-17 17:18 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("blog", "0004_tag_blog_tags"), + ] + + operations = [ + migrations.AddField( + model_name="blog", + name="is_featured", + field=models.BooleanField(default=False), + ), + ] diff --git a/blog/models.py b/blog/models.py index 45d6f62..7517365 100644 --- a/blog/models.py +++ b/blog/models.py @@ -16,6 +16,7 @@ class Blog(models.Model): body = models.TextField() tags = models.ManyToManyField(Tag, blank=True) slug = models.SlugField(unique=True, editable=False) + is_featured = models.BooleanField(default=False) published_at = models.DateTimeField(auto_now=True) def __str__(self) -> str: