forked from MarseyWorld/MarseyWorld
show total number of hats in /hats
parent
6077f09ca9
commit
1ce1410268
|
@ -29,7 +29,8 @@ def hats(v):
|
||||||
hats = owned + not_owned
|
hats = owned + not_owned
|
||||||
|
|
||||||
sales = g.db.query(func.sum(User.coins_spent_on_hats)).scalar()
|
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/<hat_id>")
|
@app.post("/buy_hat/<hat_id>")
|
||||||
@auth_required
|
@auth_required
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<h5 class="mt-4">Number of hats you designed: {{v.num_of_designed_hats}}</h5>
|
<h5 class="mt-4">Number of hats you designed: {{v.num_of_designed_hats}}</h5>
|
||||||
<h5 class="mt-4">Coins you spent on hats: {{v.coins_spent_on_hats}}</h5>
|
<h5 class="mt-4">Coins you spent on hats: {{v.coins_spent_on_hats}}</h5>
|
||||||
<h5 class="mt-4">Total hat sales: {{sales}}</h5>
|
<h5 class="mt-4">Total hat sales: {{sales}}</h5>
|
||||||
|
<h5 class="mt-4">Number of hats: {{num_of_hats}}</h5>
|
||||||
</header>
|
</header>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue