Browse Source

Permitir que ConvenioAdmin filtre convênios pela UF da Casa Legislativa

stable/1.0
Sesostris Vieira 12 years ago
parent
commit
20fb74e925
  1. 4
      sigi/apps/convenios/admin.py

4
sigi/apps/convenios/admin.py

@ -95,6 +95,10 @@ class ConvenioAdmin(admin.ModelAdmin):
del actions['delete_selected']
return actions
def lookup_allowed(self, lookup, value):
return super(ConvenioAdmin, self).lookup_allowed(lookup, value) or \
lookup in ['casa_legislativa__municipio__uf__codigo_ibge__exact']
class EquipamentoPrevistoAdmin(admin.ModelAdmin):
list_display = ('convenio', 'equipamento', 'quantidade')

Loading…
Cancel
Save