From 14088783024e97460054f77ac751a36357fefa40 Mon Sep 17 00:00:00 2001 From: Guilherme Gondim Date: Fri, 21 Nov 2008 18:48:31 +0000 Subject: [PATCH] =?UTF-8?q?Removido=20campo=20de=20UF=20na=20listagem.=20C?= =?UTF-8?q?oluna=20munic=C3=ADpio=20agora=20mostra=20o=20estado.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/casas/admin.py | 2 +- sigi/apps/contatos/admin.py | 6 +----- sigi/apps/parlamentares/admin.py | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/sigi/apps/casas/admin.py b/sigi/apps/casas/admin.py index 17da9e1..a236d2a 100644 --- a/sigi/apps/casas/admin.py +++ b/sigi/apps/casas/admin.py @@ -17,7 +17,7 @@ class TelefonesInline(generic.GenericTabularInline): class CasaLegislativaAdmin(admin.ModelAdmin): form = CasaLegislativaForm inlines = (TelefonesInline, ContatosInline) - list_display = ('nome', 'email', 'pagina_web', 'municipio', 'uf') + list_display = ('nome', 'email', 'pagina_web', 'municipio') list_display_links = ('nome',) list_filter = ('tipo',) fieldsets = ( diff --git a/sigi/apps/contatos/admin.py b/sigi/apps/contatos/admin.py index a0de408..a3fc9d5 100644 --- a/sigi/apps/contatos/admin.py +++ b/sigi/apps/contatos/admin.py @@ -34,15 +34,11 @@ class TelefoneAdmin(admin.ModelAdmin): search_fields = ('codigo_area', 'numero', 'tipo', 'nota') class ContatoAdmin(admin.ModelAdmin): - list_display = ('nome', 'nota', 'email', 'municipio', 'get_uf') + list_display = ('nome', 'nota', 'email', 'municipio') list_display_links = ('nome',) list_filter = ('nome',) search_fields = ('nome', 'nota', 'email', 'municipio__nome', 'municipio__uf__nome') - def get_uf(self, obj): - return obj.municipio.uf.nome - get_uf.short_description = 'UF' - admin.site.register(UnidadeFederativa, UnidadeFederativaAdmin) admin.site.register(Municipio, MunicipioAdmin) admin.site.register(Telefone, TelefoneAdmin) diff --git a/sigi/apps/parlamentares/admin.py b/sigi/apps/parlamentares/admin.py index b57b61d..828a0be 100644 --- a/sigi/apps/parlamentares/admin.py +++ b/sigi/apps/parlamentares/admin.py @@ -20,7 +20,7 @@ class PartidoAdmin(admin.ModelAdmin): class ParlamentarAdmin(admin.ModelAdmin): inlines = (TelefonesInline, MandatosInline) - list_display = ('nome_completo', 'nome_parlamentar', 'sexo') + list_display = ('nome_completo', 'nome_parlamentar', 'sexo', 'municipio') list_display_links = ('nome_completo', 'nome_parlamentar') list_filter = ('nome_completo', 'sexo') fieldsets = (