gf
This commit is contained in:
parent
bd28d10ac8
commit
d3167f09bd
4 changed files with 7 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue