From 449b971207dab8e83ebe35fb91ddb3defa92a22b Mon Sep 17 00:00:00 2001 From: fifthaccess Date: Tue, 1 Mar 2022 10:21:12 +0100 Subject: [PATCH] app v2.4 --- app.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index 613cc67..90fd28e 100644 --- a/app.py +++ b/app.py @@ -1,5 +1,7 @@ from flask import Flask -from model import Todoitem, db +from models import Kuenstler,Lied,LiedKuenstler,Manager,db +from flask.templating import render_template +from addItemForm import AddItemForm app = Flask(__name__) app.secret_key = "fifth" @@ -7,9 +9,11 @@ app.config["SQLALCHEMY_DATABASE_URI"] = "mysql://root:root@localhost/Projekt_06" db.init_app(app) - -#test = Todoitem -#test.__tablename__ = "test " @app.route("/", methods=["get","post"]) def index(): - \ No newline at end of file + addItemFormObject = AddItemForm() + items = db.session.query(Lied).all() + return render_template("index.html", headline="Todo Items", form = addItemFormObject, items = items) + + +app.run(debug=True) \ No newline at end of file