from flask import Flask, request app = Flask(__name__) @app.route("/") #nachrichten 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 '
' #pinnwand 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 + "