This commit is contained in:
Aevann1 2021-11-30 01:35:43 +02:00
parent 5c8759f97a
commit e86b6410e6
7 changed files with 3345 additions and 2731 deletions

View file

@ -16,13 +16,13 @@ site_name = environ.get("SITE_NAME").strip()
@auth_desired
def static_rules(v):
if not path.exists(f'./{site_name} rules.html'):
if not path.exists(f'./rules_{site_name}.html'):
if v and v.admin_level > 1:
return render_template('norules.html', v=v)
else:
abort(404)
with open(f'./{site_name} rules.html', 'r') as f:
with open(f'./rules_{site_name}.html', 'r') as f:
rules = f.read()
return render_template('rules.html', rules=rules, v=v)