Forgot to set default for the GET view

This commit is contained in:
rain
2023-05-25 13:45:17 -05:00
parent b4ff5f8729
commit 294665d544
+4 -2
View File
@@ -7,8 +7,10 @@ from app import app, db
@app.route('/', methods=['GET'])
def get_home():
"""Render website's home page."""
targets = db.session.query(target).all()
return render_template('home.html', targets=targets)
clientId = "default"
targets = db.session.query(target)
targets = targets.where(target.clientId == clientId)
return render_template('home.html', targets=targets.all(), clientId=clientId)
@app.route('/', methods=['POST'])
def post_home():