Browse Source

Algumas melhorias em inlines.

0.2
Guilherme Gondim 16 years ago
parent
commit
031f9eecff
  1. 4
      sigi/apps/casas/admin.py
  2. 4
      sigi/apps/convenios/admin.py
  3. 4
      sigi/apps/inventario/admin.py
  4. 8
      sigi/apps/parlamentares/admin.py
  5. 2
      sigi/apps/servicos/admin.py

4
sigi/apps/casas/admin.py

@ -7,11 +7,11 @@ from sigi.apps.contatos.models import Contato, Telefone
class ContatosInline(generic.GenericTabularInline):
model = Contato
extra = 1
extra = 2
class TelefonesInline(generic.GenericTabularInline):
model = Telefone
extra = 1
extra = 2
class CasaLegislativaAdmin(admin.ModelAdmin):
form = CasaLegislativaForm

4
sigi/apps/convenios/admin.py

@ -4,11 +4,11 @@ from sigi.apps.convenios.models import Convenio, EquipamentoPrevisto, Anexo
class AnexosInline(admin.TabularInline):
model = Anexo
extra = 1
extra = 2
class EquipamentoPrevistoInline(admin.TabularInline):
model = EquipamentoPrevisto
extra = 1
extra = 2
class AnexoAdmin(admin.ModelAdmin):
date_hierarchy = 'data_pub'

4
sigi/apps/inventario/admin.py

@ -8,11 +8,11 @@ from sigi.apps.inventario.models import (Fornecedor, Fabricante, Equipamento,
class ContatosInline(generic.GenericTabularInline):
model = Contato
extra = 1
extra = 2
class TelefonesInline(generic.GenericTabularInline):
model = Telefone
extra = 1
extra = 2
class FornecedorAdmin(admin.ModelAdmin):
inlines = (TelefonesInline, ContatosInline)

8
sigi/apps/parlamentares/admin.py

@ -4,9 +4,13 @@ from django.contrib.contenttypes import generic
from sigi.apps.contatos.models import Telefone
from sigi.apps.parlamentares.models import Partido, Parlamentar, Mandato
class MandatosInline(admin.StackedInline):
model = Mandato
extra = 1
class TelefonesInline(generic.GenericTabularInline):
model = Telefone
extra = 1
extra = 2
class PartidoAdmin(admin.ModelAdmin):
list_display = ('nome', 'sigla')
@ -14,7 +18,7 @@ class PartidoAdmin(admin.ModelAdmin):
search_fields = ('nome', 'sigla')
class ParlamentarAdmin(admin.ModelAdmin):
inlines = (TelefonesInline,)
inlines = (TelefonesInline, MandatosInline)
list_display = ('nome_completo', 'nome_parlamentar', 'sexo')
list_display_links = ('nome_completo', 'nome_parlamentar')
list_filter = ('nome_completo', 'sexo')

2
sigi/apps/servicos/admin.py

@ -6,7 +6,7 @@ from sigi.apps.servicos.models import Servico
class ContatosInline(generic.GenericTabularInline):
model = Contato
extra = 1
extra = 2
verbose_name = 'colaborador Interlegis'
verbose_name_plural = 'colaboradores Interlegis'

Loading…
Cancel
Save