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:
parent
acd00a8369
commit
36e5d540ff
2 changed files with 2 additions and 1 deletions
1
db.py
1
db.py
|
@ -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):
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue