diff --git a/app.py b/app.py index 15f40a7..2dceb05 100644 --- a/app.py +++ b/app.py @@ -4,19 +4,26 @@ app = Flask(__name__) @app.route("/") +@app.route("/app/") def hello(): return render_template("index.html") +@app.route("/raetsel", methods=["GET", "POST"]) +@app.route("/raetsel/", methods=["GET", "POST"]) +@app.route("/app/raetsel", methods=["GET", "POST"]) +@app.route("/app/raetsel/", methods=["GET", "POST"]) @app.route("/frage", methods=["GET", "POST"]) @app.route("/frage/", methods=["GET", "POST"]) -def frage(): +@app.route("/app/frage", methods=["GET", "POST"]) +@app.route("/app/frage/", methods=["GET", "POST"]) +def raetsel(): if request.method == "POST": if request.form["antwort"] == "4": - return render_template("frage.html", ergebnis="Richtig! Das Stadiontor öffnet sich.") - return render_template("frage.html", ergebnis="Leider falsch.") + return render_template("raetsel.html", ergebnis="Richtig! Das Stadiontor öffnet sich.") + return render_template("raetsel.html", ergebnis="Leider falsch.") - return render_template("frage.html") + return render_template("raetsel.html") if __name__ == "__main__": diff --git a/templates/index.html b/templates/index.html index f93eabe..5b46cff 100644 --- a/templates/index.html +++ b/templates/index.html @@ -144,7 +144,7 @@