Add views and pinned to discussion board

This commit is contained in:
Evert Prants 2017-12-28 17:16:20 +02:00
parent d32d0b069e
commit 1449826082
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
1 changed files with 10 additions and 1 deletions

View File

@ -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)