Skip to content

Commit

Permalink
Merge pull request #84 from lnxpy/feature/featured_blog_post
Browse files Browse the repository at this point in the history
featured flag added for blogs
  • Loading branch information
lnxpy authored Aug 17, 2022
2 parents bcddb96 + 9aa59df commit 89174ac
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions blog/migrations/0005_blog_is_featured.py
Original file line number Diff line number Diff line change
@@ -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),
),
]
1 change: 1 addition & 0 deletions blog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 89174ac

Please sign in to comment.