dfs
This commit is contained in:
parent
678c10fc11
commit
d1bab91720
1 changed files with 10 additions and 10 deletions
|
@ -92,20 +92,20 @@ def admins(v):
|
||||||
admins = g.db.query(User).options(lazyload('*')).filter_by(admin_level=6).order_by(User.coins.desc()).all()
|
admins = g.db.query(User).options(lazyload('*')).filter_by(admin_level=6).order_by(User.coins.desc()).all()
|
||||||
return render_template("admins.html", v=v, admins=admins)
|
return render_template("admins.html", v=v, admins=admins)
|
||||||
|
|
||||||
@app.get("/log")
|
# @app.get("/log")
|
||||||
@app.get("/modlog")
|
# @app.get("/modlog")
|
||||||
@auth_desired
|
# @auth_desired
|
||||||
def log(v):
|
# def log(v):
|
||||||
|
|
||||||
page=int(request.args.get("page",1))
|
# page=int(request.args.get("page",1))
|
||||||
|
|
||||||
if v and v.admin_level == 6: actions = g.db.query(ModAction).order_by(ModAction.id.desc()).offset(25 * (page - 1)).limit(26).all()
|
# if v and v.admin_level == 6: actions = g.db.query(ModAction).order_by(ModAction.id.desc()).offset(25 * (page - 1)).limit(26).all()
|
||||||
else: actions=g.db.query(ModAction).options(lazyload('*')).filter(ModAction.kind!="shadowban", ModAction.kind!="unshadowban", ModAction.kind!="club", ModAction.kind!="unclub").order_by(ModAction.id.desc()).offset(25*(page-1)).limit(26).all()
|
# else: actions=g.db.query(ModAction).options(lazyload('*')).filter(ModAction.kind!="shadowban", ModAction.kind!="unshadowban", ModAction.kind!="club", ModAction.kind!="unclub").order_by(ModAction.id.desc()).offset(25*(page-1)).limit(26).all()
|
||||||
|
|
||||||
next_exists=len(actions)==26
|
# next_exists=len(actions)==26
|
||||||
actions=actions[:25]
|
# actions=actions[:25]
|
||||||
|
|
||||||
return render_template("log.html", v=v, actions=actions, next_exists=next_exists, page=page)
|
# return render_template("log.html", v=v, actions=actions, next_exists=next_exists, page=page)
|
||||||
|
|
||||||
@app.get("/log/<id>")
|
@app.get("/log/<id>")
|
||||||
@auth_desired
|
@auth_desired
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue