forked from MarseyWorld/MarseyWorld
remove hw
parent
8b98eabbb9
commit
67826a52e0
|
@ -758,16 +758,14 @@ class User(Base):
|
||||||
@lazy
|
@lazy
|
||||||
def profile_url(self):
|
def profile_url(self):
|
||||||
host = current_host()
|
host = current_host()
|
||||||
if self.hw_zombie < 0:
|
|
||||||
return f"{host}/assets/images/halloween/zombies/{random.randint(1, 10)}.webp?v=1"
|
|
||||||
if self.agendaposter:
|
if self.agendaposter:
|
||||||
return f"{SITE_FULL}/e/chudsey.webp"
|
return f"{host}/e/chudsey.webp"
|
||||||
if self.rainbow:
|
if self.rainbow:
|
||||||
return f"{host}/e/marseysalutepride.webp"
|
return f"{host}/e/marseysalutepride.webp"
|
||||||
if self.profileurl:
|
if self.profileurl:
|
||||||
if self.profileurl.startswith('/'): return host + self.profileurl
|
if self.profileurl.startswith('/'): return host + self.profileurl
|
||||||
return self.profileurl
|
return self.profileurl
|
||||||
return f"{SITE_FULL}/assets/images/default-profile-pic.webp?v=1008"
|
return f"{host}/assets/images/default-profile-pic.webp?v=1008"
|
||||||
|
|
||||||
@lazy
|
@lazy
|
||||||
def json_popover(self, v):
|
def json_popover(self, v):
|
||||||
|
|
|
@ -7,7 +7,6 @@ import time
|
||||||
from files.helpers.assetcache import assetcache_path
|
from files.helpers.assetcache import assetcache_path
|
||||||
from files.helpers.wrappers import calc_users
|
from files.helpers.wrappers import calc_users
|
||||||
from files.helpers.hosts import current_host
|
from files.helpers.hosts import current_host
|
||||||
import math
|
|
||||||
|
|
||||||
@app.template_filter("post_embed")
|
@app.template_filter("post_embed")
|
||||||
def post_embed(id, v):
|
def post_embed(id, v):
|
||||||
|
@ -54,5 +53,5 @@ def inject_constants():
|
||||||
"EMAIL_REGEX_PATTERN":EMAIL_REGEX_PATTERN,
|
"EMAIL_REGEX_PATTERN":EMAIL_REGEX_PATTERN,
|
||||||
"CONTENT_SECURITY_POLICY_DEFAULT":CONTENT_SECURITY_POLICY_DEFAULT,
|
"CONTENT_SECURITY_POLICY_DEFAULT":CONTENT_SECURITY_POLICY_DEFAULT,
|
||||||
"CONTENT_SECURITY_POLICY_HOME":CONTENT_SECURITY_POLICY_HOME,
|
"CONTENT_SECURITY_POLICY_HOME":CONTENT_SECURITY_POLICY_HOME,
|
||||||
"bar_position": bar_position(), "current_host": current_host()
|
"current_host": current_host()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue