forked from rDrama/rDrama
master
parent
28186bb69b
commit
3afea9f7b2
|
@ -337,7 +337,7 @@ def sign_up_post(v):
|
||||||
# check self-setting badges
|
# check self-setting badges
|
||||||
badge_types = g.db.query(BadgeDef).filter(BadgeDef.qualification_expr.isnot(None)).all()
|
badge_types = g.db.query(BadgeDef).filter(BadgeDef.qualification_expr.isnot(None)).all()
|
||||||
for badge in badge_types:
|
for badge in badge_types:
|
||||||
if eval(badge.qualification_expr, {}, {'v': self}):
|
if eval(badge.qualification_expr, {}, {'v': v}):
|
||||||
if not ref_user.has_badge(badge.id):
|
if not ref_user.has_badge(badge.id):
|
||||||
new_badge = Badge(user_id=ref_user.id, badge_id=badge.id)
|
new_badge = Badge(user_id=ref_user.id, badge_id=badge.id)
|
||||||
g.db.add(new_badge)
|
g.db.add(new_badge)
|
||||||
|
|
4
setup
4
setup
|
@ -1,6 +1,5 @@
|
||||||
sudo cd /drama
|
sudo cd /drama
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt upgrade
|
|
||||||
sudo apt install postgresql postgresql-contrib
|
sudo apt install postgresql postgresql-contrib
|
||||||
sudo apt install redis-server
|
sudo apt install redis-server
|
||||||
sudo rm /etc/redis/redis.conf
|
sudo rm /etc/redis/redis.conf
|
||||||
|
@ -13,5 +12,6 @@ sudo psql --u postgres -f seed-db.sql postgres
|
||||||
sudo apt install python3-pip
|
sudo apt install python3-pip
|
||||||
sudo pip3 install -r requirements.txt
|
sudo pip3 install -r requirements.txt
|
||||||
sudo cp env /env
|
sudo cp env /env
|
||||||
|
source /env
|
||||||
sudo apt install gunicorn
|
sudo apt install gunicorn
|
||||||
sudo gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80
|
sudo gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80 --reload-extra-file ./files/templates/
|
Loading…
Reference in New Issue