fdfd
This commit is contained in:
parent
5c8759f97a
commit
e86b6410e6
7 changed files with 3345 additions and 2731 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue