This commit is contained in:
Aevann1 2021-09-12 03:41:48 +02:00
parent bd28d10ac8
commit d3167f09bd
4 changed files with 7 additions and 7 deletions

View file

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