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 = (