From 0b3f48353c6c5121143d12b5280874726527acea Mon Sep 17 00:00:00 2001 From: "Camilo Carlos (Estagiario)" Date: Tue, 17 Aug 2010 18:44:46 +0000 Subject: [PATCH] =?UTF-8?q?Desabilitando=20ac=C3=A3o=20de=20remover=20casa?= =?UTF-8?q?=20legislativa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/casas/admin.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sigi/apps/casas/admin.py b/sigi/apps/casas/admin.py index a034875..353ddda 100644 --- a/sigi/apps/casas/admin.py +++ b/sigi/apps/casas/admin.py @@ -27,7 +27,7 @@ class CasaLegislativaAdmin(admin.ModelAdmin): form = CasaLegislativaForm change_form_template = 'casas/change_form.html' change_list_template = 'casas/change_list.html' - actions = ['delete_selected','etiqueta','relatorio'] + actions = ['etiqueta','relatorio'] inlines = (TelefonesInline, ContatosInline, ConveniosInline) list_display = ('nome','municipio','parlamentar','logradouro') list_display_links = ('nome',) @@ -70,5 +70,10 @@ class CasaLegislativaAdmin(admin.ModelAdmin): report.generate_by(PDFGenerator, filename=response) return response relatorio.short_description = u"Gerar relatório(s) da(s) casa(s) selecionada(s)" + + def get_actions(self, request): + actions = super(CasaLegislativaAdmin, self).get_actions(request) + del actions['delete_selected'] + return actions admin.site.register(CasaLegislativa, CasaLegislativaAdmin)