This commit is contained in:
annika koenig 2026-06-17 16:34:28 +02:00
parent bc02a05082
commit 79673d5999
2 changed files with 17 additions and 17 deletions

17
app.py
View file

@ -18,20 +18,3 @@ def frage():
if __name__ == "__main__":
app.run(host="0.0.0.0", port=9006) # 90 + Raumnummer
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 + "<li>" + e + "</li>"
return '<h1>Pinnwand</h1>' \
'<form method="post"><input name="nachricht">' \
'<button>Senden</button></form><ul>' + liste + '</ul>'
if __name__ == "__main__":
app.run(host="0.0.0.0", port=9006) # 90 + Raumnummer

17
pinnwand.py Normal file
View file

@ -0,0 +1,17 @@
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 + "<li>" + e + "</li>"
return '<h1>Pinnwand</h1>' \
'<form method="post"><input name="nachricht">' \
'<button>Senden</button></form><ul>' + liste + '</ul>'
if __name__ == "__main__":
app.run(host="0.0.0.0", port=9006) # 90 + Raumnummer