rewrite routing to list
This commit is contained in:
@@ -26,16 +26,17 @@ def login():
|
||||
auth_user_id = db.user_cred.find_one({"username": username},{"uuid": 1})
|
||||
if auth_user_id:
|
||||
app.logger.info(auth_user_id)
|
||||
return render_template("welcome.html", id=auth_user_id["uuid"])
|
||||
return redirect(url_for("list", id=auth_user_id["uuid"]))
|
||||
#return render_template("list.html", username=username)
|
||||
else:
|
||||
return render_template("404.html")
|
||||
return redirect(url_for("not_found"))
|
||||
else:
|
||||
error = "Usernaam of wachtwoord onbekend, probeer opnieuw"
|
||||
return render_template("login.html", error=error)
|
||||
|
||||
@app.route("/welcome/<id>", methods=['GET'])
|
||||
def welcome(id):
|
||||
print("Hello: ", id)
|
||||
@app.route("/list/<id>", methods=['GET'])
|
||||
def list(id):
|
||||
return render_template("list.html", id=id)
|
||||
|
||||
@app.errorhandler(404)
|
||||
def not_found(error):
|
||||
|
||||
Reference in New Issue
Block a user