dg
This commit is contained in:
parent
18f02af1aa
commit
c11107ccc0
8 changed files with 150 additions and 12 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue