diff --git a/sigi/apps/contatos/admin.py b/sigi/apps/contatos/admin.py index 63ae549..f8f498c 100644 --- a/sigi/apps/contatos/admin.py +++ b/sigi/apps/contatos/admin.py @@ -25,6 +25,7 @@ class MicrorregiaoInline(admin.TabularInline): class SenadorInline(admin.StackedInline): model = Senador extra = 0 + autocomplete_fields = ("partido",) @admin.register(UnidadeFederativa) @@ -53,10 +54,16 @@ class MesorregiaoAdmin(admin.ModelAdmin): "codigo_ibge", "uf__sigla", ) + autocomplete_fields = ("uf",) get_queryset = queryset_ascii inlines = (MicrorregiaoInline,) +@admin.register(Microrregiao) +class MicrorregiaoAdmin(admin.ModelAdmin): + search_fields = ("search_text",) + + @admin.register(Municipio) class MunicipioAdmin(admin.ModelAdmin): actions = None @@ -111,6 +118,7 @@ class MunicipioAdmin(admin.ModelAdmin): }, ), ) + autocomplete_fields = ("uf", "microrregiao") search_fields = ("search_text", "codigo_ibge", "codigo_tse", "uf__sigla") diff --git a/sigi/apps/eventos/admin.py b/sigi/apps/eventos/admin.py index 0d0771f..146ec88 100644 --- a/sigi/apps/eventos/admin.py +++ b/sigi/apps/eventos/admin.py @@ -88,6 +88,7 @@ class ChecklistInline(admin.StackedInline): class EquipeInline(admin.StackedInline): model = Equipe + autocomplete_fields = ("membro", "funcao") class ConviteInline(admin.StackedInline): @@ -97,6 +98,7 @@ class ConviteInline(admin.StackedInline): class ModuloInline(admin.StackedInline): model = Modulo + autocomplete_fields = ("apresentador", "monitor") class AnexoInline(admin.StackedInline): @@ -167,6 +169,7 @@ class EventoAdmin(CartExportMixin, admin.ModelAdmin): ) autocomplete_fields = ( "tipo_evento", + "solicitacao", "casa_anfitria", "municipio", )