1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Add spoiler field

This commit is contained in:
Steffo 2018-07-23 22:21:52 +02:00
parent acd00a8369
commit 36e5d540ff
2 changed files with 2 additions and 1 deletions

1
db.py
View file

@ -673,6 +673,7 @@ class Diario(Base):
saver = relationship("Telegram", foreign_keys=saver_id, backref="diario_saves", lazy="joined")
author_id = Column(Integer, ForeignKey("telegram.telegram_id"))
author = relationship("Telegram", foreign_keys=author_id, backref="diario_authored", lazy="joined")
spoiler = Column(Boolean, default=False)
text = Column(String)
def __repr__(self):

View file

@ -1,4 +1,4 @@
<blockquote id="entry-{{ entry.id }}" class="entry">
<blockquote id="entry-{{ entry.id }}" class="entry {% if entry.spoiler %}spoiler{% endif %}">
<div class="left">
<p>
<span class="text">{{ entry.text }}</span>