From 06b15c08c1b78adf9e26eb738b7a3964199989f1 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Wed, 20 Oct 2021 16:31:16 +0800 Subject: Add page /admin/umbrellas Lists all umbrellas in a table. --- jimbrella/web.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'jimbrella/web.py') diff --git a/jimbrella/web.py b/jimbrella/web.py index 8b45309..e2de758 100644 --- a/jimbrella/web.py +++ b/jimbrella/web.py @@ -8,7 +8,7 @@ app = Flask("jimbrella") @app.route("/admin") -def index(): +def admin_index(): umbrellas = db.read() statuses = Database.group_by_status(umbrellas) return render_template( @@ -20,5 +20,14 @@ def index(): ) +@app.route("/admin/umbrellas") +def admin_umbrellas(): + umbrellas = db.read() + return render_template( + "admin/umbrellas.html", + umbrellas=umbrellas, + ) + + if __name__ == "__main__": app.run() -- cgit v1.2.3