fdfd
This commit is contained in:
parent
4031057bb1
commit
a647bf2cef
16 changed files with 36 additions and 50 deletions
|
@ -43,7 +43,7 @@ def participation_stats(v):
|
|||
@app.get("/paypigs")
|
||||
@auth_desired
|
||||
def patrons(v):
|
||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||
|
||||
users = g.db.query(User).options(lazyload('*')).filter(User.patron > 0).order_by(User.patron.desc()).all()
|
||||
return render_template("patrons.html", v=v, users=users)
|
||||
|
||||
|
@ -108,7 +108,7 @@ def api(v):
|
|||
@app.get("/contact")
|
||||
@auth_desired
|
||||
def contact(v):
|
||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||
|
||||
return render_template("contact.html", v=v)
|
||||
|
||||
@app.post("/contact")
|
||||
|
@ -151,7 +151,7 @@ def robots_txt():
|
|||
@app.get("/settings")
|
||||
@auth_required
|
||||
def settings(v):
|
||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||
|
||||
|
||||
return redirect("/settings/profile")
|
||||
|
||||
|
@ -159,7 +159,7 @@ def settings(v):
|
|||
@app.get("/settings/profile")
|
||||
@auth_required
|
||||
def settings_profile(v):
|
||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||
|
||||
|
||||
return render_template("settings_profile.html",
|
||||
v=v)
|
||||
|
@ -168,7 +168,7 @@ def settings_profile(v):
|
|||
@app.get("/titles")
|
||||
@auth_desired
|
||||
def titles(v):
|
||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||
|
||||
|
||||
titles = [x for x in g.db.query(Title).order_by(text("id asc")).all()]
|
||||
return render_template("/titles.html",
|
||||
|
@ -178,7 +178,7 @@ def titles(v):
|
|||
@app.get("/badges")
|
||||
@auth_desired
|
||||
def badges(v):
|
||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||
|
||||
|
||||
badges = g.db.query(BadgeDef).all()
|
||||
return render_template("badges.html", v=v, badges=badges)
|
||||
|
@ -186,7 +186,7 @@ def badges(v):
|
|||
@app.get("/blocks")
|
||||
@auth_desired
|
||||
def blocks(v):
|
||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||
|
||||
|
||||
blocks=g.db.query(UserBlock).all()
|
||||
users = []
|
||||
|
@ -200,7 +200,7 @@ def blocks(v):
|
|||
@app.get("/banned")
|
||||
@auth_desired
|
||||
def banned(v):
|
||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||
|
||||
|
||||
users = [x for x in g.db.query(User).filter(User.is_banned > 0, User.unban_utc == 0).all()]
|
||||
return render_template("banned.html", v=v, users=users)
|
||||
|
@ -208,7 +208,7 @@ def banned(v):
|
|||
@app.get("/formatting")
|
||||
@auth_desired
|
||||
def formatting(v):
|
||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||
|
||||
|
||||
return render_template("formatting.html", v=v)
|
||||
|
||||
|
@ -228,7 +228,7 @@ def serviceworker():
|
|||
@app.get("/settings/security")
|
||||
@auth_required
|
||||
def settings_security(v):
|
||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||
|
||||
|
||||
return render_template("settings_security.html",
|
||||
v=v,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue