diff --git a/crud.py b/crud.py index 57cfd2e22..41548d106 100644 --- a/crud.py +++ b/crud.py @@ -162,6 +162,10 @@ class CrudDeleteMixin(FormMessagesMixin): form_invalid_message = make_form_invalid_message( _('O registro não foi excluído.')) + @property + def cancel_url(self): + return self.detail_url + def get_success_url(self): return self.list_url diff --git a/templates/crud/confirm_delete.html b/templates/crud/confirm_delete.html index 367f5857d..685c0d4ac 100644 --- a/templates/crud/confirm_delete.html +++ b/templates/crud/confirm_delete.html @@ -10,7 +10,7 @@ {% endblocktrans %}