From a2cb50c674bbee41d29f5bcd91945ab806dcfbbb Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 15 Feb 2015 21:26:27 -0600 Subject: [PATCH] Add delete button to zone page --- src/dyns/controllers.py | 2 ++ src/dyns/templates/zone.html.j2 | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/dyns/controllers.py b/src/dyns/controllers.py index 39700be..f1c8def 100644 --- a/src/dyns/controllers.py +++ b/src/dyns/controllers.py @@ -185,6 +185,8 @@ class ZoneController(BaseController): zone = self.get_zone(name) self.session.delete(zone) self.session.commit() + if request.want in ('html', 'xhtml'): + raise milla.HTTPSeeOther(location='/zones/') response.status_int = 204 return response diff --git a/src/dyns/templates/zone.html.j2 b/src/dyns/templates/zone.html.j2 index 7a11902..758e209 100644 --- a/src/dyns/templates/zone.html.j2 +++ b/src/dyns/templates/zone.html.j2 @@ -7,6 +7,12 @@ {%- endblock %} {% block body %}
+
+
+ +
+