From 2a26a062c673834957b8e13c88a925c3b21bcf3e Mon Sep 17 00:00:00 2001 From: Lena Date: Wed, 17 Jun 2026 16:11:00 +0200 Subject: [PATCH] Pinnwand --- app/app.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/app.py b/app/app.py index a4168d4..6d1f63f 100644 --- a/app/app.py +++ b/app/app.py @@ -1,19 +1,19 @@ -from flask import Flask +from flask import Flask, request, redirect app = Flask(__name__) +eintraege = [] # speichert die Nachrichten (im Arbeitsspeicher) -@app.route("/") -def hello(): - return "Hallo aus meiner Flask-App! Willkommen in unseren Escape Room! Wuhuuuu es wird Gruselig" - -@app.route("/frage", methods=["GET", "POST"]) -def frage(): +@app.route("/pinnwand", methods=["GET", "POST"]) +def pinnwand(): if request.method == "POST": - if request.form["antwort"] == "8": - return "Richtig!" - return "Leider falsch." - return '
Was ist 3 + 5? ' \ - '
' + eintraege.append(request.form["nachricht"]) + return redirect("/app/pinnwand") + liste = "" + for e in eintraege: + liste = liste + "
  • " + e + "
  • " + return '

    Pinnwand

    ' \ + '
    ' \ + '
    ' if __name__ == "__main__": - app.run(host="0.0.0.0", port=9008) # 90 + Raumnummer (Wir: 08) \ No newline at end of file + app.run(host="0.0.0.0", port=9008) \ No newline at end of file