mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 21:44:21 +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")
|
saver = relationship("Telegram", foreign_keys=saver_id, backref="diario_saves", lazy="joined")
|
||||||
author_id = Column(Integer, ForeignKey("telegram.telegram_id"))
|
author_id = Column(Integer, ForeignKey("telegram.telegram_id"))
|
||||||
author = relationship("Telegram", foreign_keys=author_id, backref="diario_authored", lazy="joined")
|
author = relationship("Telegram", foreign_keys=author_id, backref="diario_authored", lazy="joined")
|
||||||
|
spoiler = Column(Boolean, default=False)
|
||||||
text = Column(String)
|
text = Column(String)
|
||||||
|
|
||||||
def __repr__(self):
|
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">
|
<div class="left">
|
||||||
<p>
|
<p>
|
||||||
<span class="text">{{ entry.text }}</span>
|
<span class="text">{{ entry.text }}</span>
|
||||||
|
|
Loading…
Reference in a new issue