diff --git a/files/routes/hats.py b/files/routes/hats.py index 904cfa14f..bd73cff7b 100644 --- a/files/routes/hats.py +++ b/files/routes/hats.py @@ -29,7 +29,8 @@ def hats(v): hats = owned + not_owned sales = g.db.query(func.sum(User.coins_spent_on_hats)).scalar() - return render_template("hats.html", owned_hat_ids=owned_hat_ids, hats=hats, v=v, sales=sales) + num_of_hats = g.db.query(HatDef).count() + return render_template("hats.html", owned_hat_ids=owned_hat_ids, hats=hats, v=v, sales=sales, num_of_hats=num_of_hats) @app.post("/buy_hat/") @auth_required diff --git a/files/templates/hats.html b/files/templates/hats.html index d89870bfe..225c77217 100644 --- a/files/templates/hats.html +++ b/files/templates/hats.html @@ -21,6 +21,7 @@
Number of hats you designed: {{v.num_of_designed_hats}}
Coins you spent on hats: {{v.coins_spent_on_hats}}
Total hat sales: {{sales}}
+
Number of hats: {{num_of_hats}}
{% endblock %}