diff --git a/server.py b/server.py index 40496a3..223064e 100644 --- a/server.py +++ b/server.py @@ -324,7 +324,7 @@ def page_serv_add(): return abort(403) if request.method == 'GET': enti = Ente.query.order_by(Ente.nomeente).all() - return render_template("servizio/add.htm", enti=enti, pagetype="serv", user=session.get("username")) + return render_template("servizio/show.htm", action="add", enti=enti, pagetype="serv", user=session.get("username")) else: nuovoserv = Servizio(request.form['eid'], request.form['nomeservizio'], request.form['locazione']) db.session.add(nuovoserv) @@ -372,7 +372,7 @@ def page_serv_show(sid): if request.method == "GET": serv = Servizio.query.get_or_404(sid) enti = Ente.query.all() - return render_template("servizio/show.htm", serv=serv, enti=enti, user=session.get("username")) + return render_template("servizio/show.htm", action="show", serv=serv, enti=enti, user=session.get("username")) else: serv = Servizio.query.get_or_404(sid) serv.eid = request.form["eid"] diff --git a/templates/servizio/add.htm b/templates/servizio/add.htm deleted file mode 100644 index 2d38c91..0000000 --- a/templates/servizio/add.htm +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "base.htm" %} -{% block title %}Aggiungi servizio • estus{% endblock %} -{% block content %} -