|
|
|
@ -21,6 +21,24 @@ class Post(Model):
|
|
|
|
|
to_discord = BooleanField(default=False)
|
|
|
|
|
approved = BooleanField(default=False)
|
|
|
|
|
|
|
|
|
|
def show(self):
|
|
|
|
|
return {
|
|
|
|
|
'id': self.id,
|
|
|
|
|
'title': self.title,
|
|
|
|
|
'text': self.text,
|
|
|
|
|
'submitter': self.submitter,
|
|
|
|
|
'image_name': self.image_name,
|
|
|
|
|
'readonly': self.readonly,
|
|
|
|
|
'hidden': self.hidden,
|
|
|
|
|
'account_index': self.account_index,
|
|
|
|
|
'address_index': self.address_index,
|
|
|
|
|
'timestamp': self.timestamp,
|
|
|
|
|
'reddit_url': self.reddit_url,
|
|
|
|
|
'to_reddit': self.to_reddit,
|
|
|
|
|
'to_discord': self.to_discord,
|
|
|
|
|
'approved': self.approved,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
|
database = db
|
|
|
|
|
|
|
|
|
|