Browse Source

Adicionado raw_id_fields.

0.2
Guilherme Gondim 16 years ago
parent
commit
fb1415b906
  1. 2
      sigi/apps/servicos/admin.py

2
sigi/apps/servicos/admin.py

@ -7,6 +7,7 @@ from sigi.apps.servicos.models import Servico
class ContatosInline(generic.GenericTabularInline): class ContatosInline(generic.GenericTabularInline):
model = Contato model = Contato
extra = 2 extra = 2
raw_id_fields = ('municipio',)
verbose_name = 'colaborador Interlegis' verbose_name = 'colaborador Interlegis'
verbose_name_plural = 'colaboradores Interlegis' verbose_name_plural = 'colaboradores Interlegis'
@ -15,6 +16,7 @@ class ServicoAdmin(admin.ModelAdmin):
inlines = (ContatosInline,) inlines = (ContatosInline,)
list_display = ('id', 'titulo', 'tipo', 'convenio', 'situacao') list_display = ('id', 'titulo', 'tipo', 'convenio', 'situacao')
list_filter = ('tipo','situacao', 'avaliacao') list_filter = ('tipo','situacao', 'avaliacao')
raw_id_fields = ('convenio',)
search_fields = ('titulo', 'tipo', 'descricao') search_fields = ('titulo', 'tipo', 'descricao')
admin.site.register(Servico, ServicoAdmin) admin.site.register(Servico, ServicoAdmin)

Loading…
Cancel
Save