From 14498260821ca9f46aa2a0967cf1c166a62ea666 Mon Sep 17 00:00:00 2001 From: Evert Date: Thu, 28 Dec 2017 17:16:20 +0200 Subject: [PATCH] Add views and pinned to discussion board --- LandingPage/models.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/LandingPage/models.py b/LandingPage/models.py index 4fde594..bc3c64e 100644 --- a/LandingPage/models.py +++ b/LandingPage/models.py @@ -296,7 +296,8 @@ class Submission(TimestampedModel): verbose_name='Embed URL' ) pinned = models.BooleanField( - help_text='Whether or not this submission is pinned' + help_text='Whether or not this submission is pinned', + default=False ) tags = models.CharField( help_text='Tags applied to this link submission', @@ -370,6 +371,14 @@ class DiscussionBoard(TimestampedModel): help_text='The body of the post', verbose_name='Body' ) + views = models.IntegerField( + help_text='The amount of times this board has been viewed', + default=0 + ) + pinned = models.BooleanField( + help_text='Whether or not this board is pinned', + default=False + ) def __str__(self): return '[%s] "%s" by %s'%(self.show.abbr, self.title, self.user)