remotes/1693045480750635534/spooky-22
Aevann1 2021-09-01 21:41:05 +02:00
parent fa818b2d0b
commit 38eaced40e
1 changed files with 8 additions and 1 deletions

View File

@ -142,12 +142,19 @@ def leaderboard(v):
users4 = users.order_by(User.comment_count.desc()).limit(10).all()
return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4)
@app.get("/award_leaderboard")
@auth_desired
def award_leaderboard(v):
return render_template("award_leaderboard.html", v=v, users=a_leaderboard())
@cache.memoize(timeout=86400)
def a_leaderboard():
users = g.db.query(User).options(lazyload('*')).all()
users = sorted(users, key=lambda x: x.received_awards_num, reverse=True)[:10]
return render_template("award_leaderboard.html", v=v, users=users)
return users
@app.get("/@<username>/css")
def get_css(username):