From cf6ed0334c6ff7a4b5be6eeb9c42d43e5a62a839 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Mon, 7 Mar 2016 09:25:31 -0300 Subject: [PATCH] =?UTF-8?q?Adiciona=20op=C3=A7=C3=A3o=20de=20excluir=20aut?= =?UTF-8?q?oria?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- materia/views.py | 2 ++ templates/materia/autoria_edit.html | 1 + 2 files changed, 3 insertions(+) diff --git a/materia/views.py b/materia/views.py index c0b1dd7e2..ddd94eb99 100644 --- a/materia/views.py +++ b/materia/views.py @@ -1290,6 +1290,8 @@ class AutoriaEditView(GenericView, FormMixin): if 'salvar' in request.POST: autoria.save() + elif 'excluir' in request.POST: + autoria.delete() return self.form_valid(form) diff --git a/templates/materia/autoria_edit.html b/templates/materia/autoria_edit.html index 9ca456339..f26bd89cf 100644 --- a/templates/materia/autoria_edit.html +++ b/templates/materia/autoria_edit.html @@ -62,6 +62,7 @@
+