Aggiunta pulsante elimina
This commit is contained in:
4
app.py
4
app.py
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user