From faebd00fd53f4404ce97cdb33538dd38279f4c57 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Sun, 29 Jan 2023 01:44:42 -0800 Subject: [PATCH] add stats to about page --- suchwow/routes/main.py | 9 ++++++++- suchwow/templates/about.html | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/suchwow/routes/main.py b/suchwow/routes/main.py index 96b8088..977d5c9 100644 --- a/suchwow/routes/main.py +++ b/suchwow/routes/main.py @@ -3,6 +3,7 @@ from math import ceil from flask import Blueprint, request, render_template, flash from suchwow._models import Post, User, TipReceived +from suchwow.wownero import from_atomic bp = Blueprint('main', 'main') @@ -50,4 +51,10 @@ def index(): @bp.route("/about") def about(): mods = User.select().where(User.moderator == True) - return render_template("about.html", mods=mods) \ No newline at end of file + return render_template( + "about.html", + mods=mods, + meme_count=Post.select().where(Post.approved == True).count(), + wow_received=round(from_atomic(sum([i.amount for i in TipReceived.select()])), 2), + memer_count=User.select().count(), + ) \ No newline at end of file diff --git a/suchwow/templates/about.html b/suchwow/templates/about.html index 3ca55af..fa595fe 100644 --- a/suchwow/templates/about.html +++ b/suchwow/templates/about.html @@ -2,6 +2,27 @@ {% block content %} + +

About