* Update user.py

* Update awards.py

* Update comments.py

* Update const.py

* Update awards.py

* Update user.py

* Update const.py

* Update awards.py

* Update comments.py

* use bhm banners

* bhm pfps (#194)

Co-authored-by: beese_buck <16601315+geese-suck@users.noreply.github.com>
Co-authored-by: geese_suck <16601315+cant-be-blenk@users.noreply.github.com>
This commit is contained in:
Aevann1 2022-01-31 20:20:31 -08:00 committed by GitHub
parent fc080f5f49
commit 0443daeec3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 61 additions and 8 deletions

View file

@ -125,7 +125,8 @@ class User(Base):
ban_evade = Column(Integer, default=0)
original_username = deferred(Column(String))
referred_by = Column(Integer, ForeignKey("users.id"))
nwordpass = Column(Boolean)
badges = relationship("Badge", viewonly=True)
subscriptions = relationship("Subscription", viewonly=True)
following = relationship("Follow", primaryjoin="Follow.user_id==User.id", viewonly=True)
@ -438,7 +439,7 @@ class User(Base):
if self.profileurl:
if self.profileurl.startswith('/'): return SITE_FULL + self.profileurl
return self.profileurl
if SITE_NAME == 'Drama': return f"{SITE_FULL}/static/assets/images/defaultpictures/{random.randint(1, 150)}.webp?a=1008"
if SITE_NAME == 'Drama': return f"{SITE_FULL}/static/assets/images/defaultpictures/bhm/{random.randint(1, 25)}.webp?a=1008"
return f"{SITE_FULL}/static/assets/images/default-profile-pic.webp?a=1008"
@lazy
@ -663,4 +664,4 @@ class ViewerRelationship(Base):
return f"{months}mo ago"
else:
years = int(months / 12)
return f"{years}yr ago"
return f"{years}yr ago"