From 916553ad4738d47d4ba1216179fae724323020e8 Mon Sep 17 00:00:00 2001 From: mikka Date: Sat, 16 May 2026 10:41:56 +0200 Subject: [PATCH] Flagen Hintergrund Styling --- app.py | 4 +++- templates/index.html | 9 ++++----- templates/karte.html | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app.py b/app.py index baea018..f8e61cf 100644 --- a/app.py +++ b/app.py @@ -249,12 +249,14 @@ def loeschen(): except TypeError: return "Irgendwas ist GANZ falsch", 400 try: - with open(dateiNameFürListe(liste), "x") as f: + with open(dateiNameFürListe(liste), "r+") as f: songs = json.load(f) if len(songs) < song + 1: return "Das Lied Gibt es Nicht", 400 del songs[song] + f.seek(0) json.dump(songs, f, indent=2, ensure_ascii=False) + f.truncate() return redirect("/remove?liste=" + liste, 303) except FileNotFoundError: return "Die Liste Ist nicht da (Du kannst Sie anlegen)", 400 diff --git a/templates/index.html b/templates/index.html index 1eacd58..a3e2788 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,10 +1,10 @@