Skip to content

Commit

Permalink
app v2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
fifthaccess committed Mar 1, 2022
1 parent 410383f commit 449b971
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
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"

app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
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():

addItemFormObject = AddItemForm()
items = db.session.query(Lied).all()
return render_template("index.html", headline="Todo Items", form = addItemFormObject, items = items)


app.run(debug=True)

0 comments on commit 449b971

Please sign in to comment.