forked from rDrama/rDrama
1
0
Fork 0

fMerge branch 'frost' of https://github.com/Aevann1/Drama into frost

master
Aevann1 2022-05-20 20:50:55 +00:00
commit 3870aea654
4 changed files with 9 additions and 13 deletions

View File

@ -188,6 +188,7 @@ class User(Base):
@property
@lazy
def is_cakeday(self):
if SITE_NAME != 'rDrama': return False
if time.time() - self.created_utc > 363 * 86400:
date = time.strftime("%d %b", time.gmtime(self.created_utc))
now = time.strftime("%d %b", time.gmtime())

View File

@ -324,8 +324,6 @@ def sign_up_post(v):
profileurl = '/e/' + random.choice(marseys_const) + '.webp'
if SITE == "watchpeopledie.co": print(f'1: {username}')
new_user = User(
username=username,
original_username = username,
@ -337,13 +335,9 @@ def sign_up_post(v):
profileurl=profileurl
)
if SITE == "watchpeopledie.co": print(f'2: {username}')
g.db.add(new_user)
g.db.flush()
if SITE == "watchpeopledie.co": print(f'3: {username}')
if ref_id:
ref_user = g.db.query(User).filter_by(id=ref_id).one_or_none()
@ -374,12 +368,8 @@ def sign_up_post(v):
session["session_id"] = token_hex(49)
session["lo_user"] = new_user.id
if SITE == "watchpeopledie.co": print(f'4: {username}')
g.db.commit()
if SITE == "watchpeopledie.co": print(f'5: {username}')
return redirect(SITE_FULL)

View File

@ -27,8 +27,13 @@
</div>
{% endif %}
<div class="navbar navbar-expand-md navbar-light" id="navbar" style="background: url('/assets/images/balloons.webp') !important;">
<div class="container-fluid" style="padding:0; background: transparent !important">
{% if SITE_NAME == 'rDrama' %}
<div class="navbar navbar-expand-md navbar-light" id="navbar" style="background: url('/assets/images/balloons.webp') !important;">
<div class="container-fluid" style="padding:0; background: transparent !important">
{% else %}
<div class="navbar navbar-expand-md navbar-light" id="navbar">
<div class="container-fluid" style="padding:0;">
{% endif %}
<a href="/" class="navbar-brand mr-auto {% if SITE_NAME in ('PCM','WPD') and not sub %}flex-grow-1{% endif %}">
{% if SITE_NAME == 'rDrama' %} {# birthgay only #}
<img alt="header icon" height=33 src="/assets/images/emojis/marseyparty.webp?v=birthgay">

View File

@ -3,7 +3,7 @@ cp ./env /env
. /env
apt update
apt -y upgrade
apt -y install git postgresql postgresql-contrib redis-server python3-pip libenchant1c2a ffmpeg tmux nginx snapd
apt -y install git postgresql postgresql-contrib redis-server python3-pip libenchant1c2a ffmpeg tmux nginx snapd ufw
cp pg_hba.conf /etc/postgresql/12/main/pg_hba.conf
service postgresql restart
psql -U postgres -f schema.sql postgres