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 @@
+