From a7fa809ae4d01d41a7c58f4db072d74d9ffbffc1 Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Mon, 3 Jul 2023 22:58:08 +1000 Subject: [PATCH] some structure --- app.py | 8 ++++++-- boards.py | 3 +++ templates/main-page.html | 8 +++++++- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 boards.py diff --git a/app.py b/app.py index 46e1fcd..12561ae 100644 --- a/app.py +++ b/app.py @@ -2,6 +2,7 @@ from flask import Flask, render_template, request from flask_assets import Bundle, Environment from todo import todos +from boards import board_list app = Flask(__name__) @@ -31,9 +32,11 @@ def healthz(): @app.route("/") -def homepage(): - return render_template("main-page.html") +def homepage(): + return render_template("main-page.html", boards=board_list) + +### stolen @app.route("/todo") def page_todo(): return render_template("page1.html") @@ -52,6 +55,7 @@ def search_todo(): res_todos.append(todo) return render_template("todo.html", todos=res_todos) +### /stolen diff --git a/boards.py b/boards.py new file mode 100644 index 0000000..091b4bb --- /dev/null +++ b/boards.py @@ -0,0 +1,3 @@ +board_list = [ + 'b','a','d' +] \ No newline at end of file diff --git a/templates/main-page.html b/templates/main-page.html index 009f67b..dedf627 100644 --- a/templates/main-page.html +++ b/templates/main-page.html @@ -3,7 +3,13 @@ {% block content %}
- sup + Dobro pozhalovat. AGAIN.
+{% for board in boards %} + + +{% endfor %} {% endblock content %} \ No newline at end of file