Aggiunta pulsante elimina

This commit is contained in:
2026-02-26 13:43:56 +01:00
parent 8a15a29dcf
commit 326362d157

4
app.py
View File

@@ -54,7 +54,7 @@ def web_ui():
html = "<table border>" html = "<table border>"
for ciscomerda in compiti: for ciscomerda in compiti:
html += "<tr>" html += "<tr>"
html += f"<td>{ciscomerda["descrizione"]}</td>" html += f"<td>{ciscomerda["descrizione"]}</td><td><a href=\"/form_delete\" class=\"button\">Elimina</a>"
html += "</tr>" html += "</tr>"
html += "</table>" html += "</table>"
@@ -74,6 +74,6 @@ def form_add():
d = request.args.get("descrizione") d = request.args.get("descrizione")
compiti.append({"id": id_counter, "descrizione": d}) compiti.append({"id": id_counter, "descrizione": d})
id_counter += 1 id_counter += 1
return redirect("/ui") return redirect("/ui")
app.run("0.0.0.0") app.run("0.0.0.0")