From 6c94f6595c32a7b6fa75403cf3afd8c364dd816f Mon Sep 17 00:00:00 2001 From: Franke Date: Wed, 8 Jul 2026 08:49:21 +0000 Subject: [PATCH] Projekt entpackt + Fix: app.py (statt app.py.py); index.html rendert Sitzplan aus sitzplan.json (Jinja-Schleife, zeigt auch nachricht) --- Projekt.7z | Bin 945 -> 0 bytes Projekt/app.py | 21 +++++++++++++++ Projekt/sitzplan.json | 27 +++++++++++++++++++ Projekt/templates/index.html | 49 +++++++++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+) delete mode 100644 Projekt.7z create mode 100644 Projekt/app.py create mode 100644 Projekt/sitzplan.json create mode 100644 Projekt/templates/index.html diff --git a/Projekt.7z b/Projekt.7z deleted file mode 100644 index 983527e07c6da58f2882d5311452d8d50b75b1a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 945 zcmV;i15W%mdc3bE8~_82DuJqQ0{{R30000Z0000000029QSXcZGaQN{Z>neb;BjT1 zG%`~o@k!M>Ck3PstA*C2G|}xCEp+fSu6hkG5!x?a=M!-8ed*d<&xS=SMz3|N4J}awZvG1gQ1eWB6@B?_IMjLD}M^?~*VIo?IeEG-ccG7G|@~;cMh!yQ~ z<-f=b)G3GICzU`SyQT0uozDNP(p0w}??m~vj9E`LO2cy&qTMMp&6jiWsHbrBFJl+< z`HL$kJ2tZw-j8qT)Yy|w?hiIwgf?S;j!g}#qBEMc!3{F;7G}R)NCB&qNMWpsNuC$l z9PIU~21W|>V}$~U#eP5;niSIg47RGyH6de{gOQeulZnefJU6v(9J0llNtdwmirDbY zwp=Qj`zNYorkpYlry*GMI+`>EWRw1U4Cmmu7W}yQ-v0tC>G@fMic1`!j3ztE3x$Fi zSF!JNJvyr_kUxLM%@fk{Qk8uJ5dgK^JK#gFUNY=FJJJEjzwxZ51oBtd!$VY79bjK; zo#vH4R3b6W#_1XYVUdrYx$=|-_a0d6yM71^+zwU%!-)rIe#aUhgU!-}kp5vX(r;LDOBd5jGX-KZ!nmhlb&^7tYk`ov_gQ^-}dqlKvnt;;?P_*#*EjPGanib0+N;mvuYx z*%DJ#kF<5KKI~9k6GQVQM^Fh|<$$b6ucRyg|EThS02c;=Y5@s>1ONvM0RRCb0|5aA TT>t=p01Sbd3IU<4a(w^*1Kqw( diff --git a/Projekt/app.py b/Projekt/app.py new file mode 100644 index 0000000..fc73653 --- /dev/null +++ b/Projekt/app.py @@ -0,0 +1,21 @@ +from flask import Flask, render_template +import json + +app = Flask(__name__) + + +@app.route("/") +def home(): + + # Sitzplan-Datei öffnen + with open("sitzplan.json", "r", encoding="utf-8") as datei: + sitzplan = json.load(datei) + + return render_template( + "index.html", + sitzplan=sitzplan + ) + + +if __name__ == "__main__": + app.run(host="0.0.0.0", port=5000) diff --git a/Projekt/sitzplan.json b/Projekt/sitzplan.json new file mode 100644 index 0000000..165219c --- /dev/null +++ b/Projekt/sitzplan.json @@ -0,0 +1,27 @@ +[ + { + "platz": "platz01", + "name": "Max", + "nachricht": "" + }, + { + "platz": "platz02", + "name": "Lea", + "nachricht": "" + }, + { + "platz": "platz03", + "name": "Tim", + "nachricht": "" + }, + { + "platz": "platz04", + "name": "Ben", + "nachricht": "" + }, + { + "platz": "platz05", + "name": "Eva", + "nachricht": "" + } +] \ No newline at end of file diff --git a/Projekt/templates/index.html b/Projekt/templates/index.html new file mode 100644 index 0000000..b4a8978 --- /dev/null +++ b/Projekt/templates/index.html @@ -0,0 +1,49 @@ + + + + Sitzplan + + + + + +

Sitzplan

+ +
+ {% for platz in sitzplan %} +
+ {{ platz.name }} + {% if platz.nachricht %} +
{{ platz.nachricht }}
+ {% endif %} +
+ {% endfor %} +
+ + +