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