From a84da0a6f960d9b4b5aee14722202e2b12c27854 Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Tue, 30 Jan 2024 01:49:36 +1000 Subject: [PATCH] re ans-post --- app.py | 4 +++- templates/main-page.html | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index ae52998..e61c9e2 100644 --- a/app.py +++ b/app.py @@ -49,7 +49,9 @@ def healthz(): @app.route("/") -def homepage(): +def homepage(): + boards0 = db.collection('boards') + board_list = [ k['_key'] for k in boards0] return render_template("main-page.html", host_id=docker_short_id, boards=board_list) diff --git a/templates/main-page.html b/templates/main-page.html index 62c1059..f73f3a3 100644 --- a/templates/main-page.html +++ b/templates/main-page.html @@ -15,6 +15,18 @@ +
+
+
+ {% if boards[0] | length > 0 %} +

Доски:

+ {% for board in boards[0] %} + board + {% endfor %} + {% endif %} +
+
+
{% endblock content %}