diff --git a/sapl/crud.py b/sapl/crud.py index 68145e417..f357ba780 100644 --- a/sapl/crud.py +++ b/sapl/crud.py @@ -96,6 +96,12 @@ def build_crud(model, *layout): def delete_url(self): return self.get_url_for_this_object('delete') + def get_template_names(self): + names = super(BaseMixin, self).get_template_names() + names.append("crud/%s.html" % + self.template_name_suffix.lstrip('_')) + return names + class CrudListView(BaseMixin, ListView): title = BaseMixin.verbose_name_plural paginate_by = 10 diff --git a/templates/comissoes/comissao_confirm_delete.html b/templates/crud/confirm_delete.html similarity index 100% rename from templates/comissoes/comissao_confirm_delete.html rename to templates/crud/confirm_delete.html diff --git a/templates/comissoes/comissao_detail.html b/templates/crud/detail.html similarity index 100% rename from templates/comissoes/comissao_detail.html rename to templates/crud/detail.html diff --git a/templates/comissoes/comissao_form.html b/templates/crud/form.html similarity index 100% rename from templates/comissoes/comissao_form.html rename to templates/crud/form.html diff --git a/templates/comissoes/comissao_list.html b/templates/crud/list.html similarity index 100% rename from templates/comissoes/comissao_list.html rename to templates/crud/list.html