fix marseyworld

master
Aevann 2024-02-19 21:43:33 +02:00
parent 03b6a085c9
commit bcc2d04435
3 changed files with 8 additions and 3 deletions

View File

@ -26,7 +26,7 @@ class Hole(Base):
public_use = Column(Boolean, default=False)
created_utc = Column(Integer)
if SITE == 'watchpeopledie.tv':
if SITE_NAME == 'WPD' and not IS_LOCALHOST:
snappy_quotes = None
else:
snappy_quotes = deferred(Column(String))

View File

@ -74,7 +74,7 @@ class Post(Base):
else:
nsfw = False
if SITE == 'watchpeopledie.tv':
if SITE_NAME == 'WPD' and not IS_LOCALHOST:
cw = Column(Boolean, default=False)
author = relationship("User", primaryjoin="Post.author_id==User.id")
@ -153,6 +153,11 @@ class Post(Base):
def permalink(self):
return SITE_FULL + self.shortlink
@property
@lazy
def text_permalink(self):
return f"[{self.title}]({self.shortlink})"
@property
@lazy
def domain(self):

View File

@ -150,7 +150,7 @@ class User(Base):
group_creation_notifs = Column(Boolean, default=False)
effortpost_notifs = Column(Boolean, default=False)
if SITE == 'watchpeopledie.tv':
if SITE_NAME == 'WPD' and not IS_LOCALHOST:
nitter = False
imgsed = False
controversial = False