From 2ae436cfd80381d40813aa4d56b9b802708a843e Mon Sep 17 00:00:00 2001 From: lena_smd02 Date: Wed, 1 Jul 2026 19:24:52 +0200 Subject: [PATCH] Adventure aus DB --- app/app.py | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/app/app.py b/app/app.py index fa60762..04c36d7 100644 --- a/app/app.py +++ b/app/app.py @@ -12,48 +12,7 @@ if __name__ == "__main__": from flask import Flask, request -app = Flask(__name__) -@app.route("/") -def hello(): - return "Hallo aus meiner Flask-App!" - -@app.route("/frage", methods=["GET", "POST"]) -def frage(): - if request.method == "POST": - if request.form["antwort"] == "8": - return "Richtig!" - return "Leider falsch." - return '
Was ist 3 + 5? ' \ - '
' - -if __name__ == "__main__": - app.run(host="0.0.0.0", port=9011) - - - from flask import Flask, request, redirect - -app = Flask(__name__) -eintraege = [] # speichert die Nachrichten (im Arbeitsspeicher) - -@app.route("/pinnwand", methods=["GET", "POST"]) -def pinnwand(): - if request.method == "POST": - 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=9011) - - - from flask import Flask -import sqlite3 app = Flask(__name__)