summaryrefslogtreecommitdiff
path: root/jimbrella/web.py
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2021-10-20 16:31:16 +0800
committerFrederick Yin <fkfd@fkfd.me>2021-10-20 16:31:16 +0800
commit06b15c08c1b78adf9e26eb738b7a3964199989f1 (patch)
treeb9d8a2c78112ccdd3846166e46d80a26401aa2f1 /jimbrella/web.py
parent27c8be28e00fbf110143d4bc4b949c610f704639 (diff)
Add page /admin/umbrellas
Lists all umbrellas in a table.
Diffstat (limited to 'jimbrella/web.py')
-rw-r--r--jimbrella/web.py11
1 files changed, 10 insertions, 1 deletions
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()