This commit is contained in:
fireworks88 2021-09-09 13:02:06 +02:00
parent 18f02af1aa
commit c11107ccc0
8 changed files with 150 additions and 12 deletions

View file

@ -3,10 +3,28 @@ from files.__main__ import app, limiter
from files.helpers.alerts import *
from files.classes.award import AWARDS
from sqlalchemy import func
from os import path
site = environ.get("DOMAIN").strip()
site_name = environ.get("SITE_NAME").strip()
@app.get('/rules')
@auth_desired
def static_rules(v):
if not path.exists('./rules.md'):
if v and v.admin_level == 6:
return render_template('norules.html', v=v)
else:
abort(404)
with open('./rules.md', 'r') as f:
rules = f.read()
return render_template('rules.html', rules=rules, v=v)
@app.get("/stats")
@auth_desired
def participation_stats(v):