forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-05-02 20:56:10 +02:00
parent f9a142a889
commit 8b24faf9fd
2 changed files with 1 additions and 4 deletions

View File

@ -496,8 +496,6 @@ def robots_txt():
@auth_required
@cache.memoize(timeout=3600)
def badges(v):
nonlurk_truecoins = 100
badges = g.db.query(BadgeDef).order_by(BadgeDef.id).all()
counts_raw = g.db.query(Badge.badge_id, func.count()).group_by(Badge.badge_id).all()
users = g.db.query(User.id).count()
@ -506,7 +504,7 @@ def badges(v):
for c in counts_raw:
counts[c[0]] = (c[1], float(c[1]) * 100 / max(users, 1))
return render_template("badges.html", v=v, badges=badges, counts=counts, nonlurk=users, nonlurk_tc=nonlurk_truecoins)
return render_template("badges.html", v=v, badges=badges, counts=counts)
@app.get("/blocks")
@auth_required

View File

@ -7,7 +7,6 @@
</pre>
<h1>User Badges</h1>
<div>This page describes the requirements for obtaining all profile badges.</div>
<div>Rarity is the ratio of badge quantity to the number of non-lurkers (truescore &geq; <span id="badges-nonlurk-tc">{{ nonlurk_tc }}</span>): <span id="badges-nonlurkers">{{ nonlurk }}</span>.</div>
<pre>