add debug text

This commit is contained in:
lza_menace 2020-12-29 12:41:10 -08:00
parent 0f1d449e69
commit 757deeaaea
2 changed files with 22 additions and 0 deletions

View file

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

View file

@ -51,6 +51,10 @@
{% endif %}
{% if config.DEBUG %}
{{ post.show() }}
{% endif %}
{#
{% if "auth" in session %}
{% if session.auth.preferred_username == post.submitter %}