Browse Source

Elimina campo search_text de convênio

pull/89/head
Sesostris Vieira 3 years ago
parent
commit
0be87faf13
  1. 5
      sigi/apps/convenios/admin.py
  2. 18
      sigi/apps/convenios/migrations/0015_remove_convenio_search_text.py
  3. 1
      sigi/apps/convenios/models.py

5
sigi/apps/convenios/admin.py

@ -77,8 +77,9 @@ class ConvenioAdmin(BaseModelAdmin):
ordering = ('casa_legislativa', '-data_retorno_assinatura') ordering = ('casa_legislativa', '-data_retorno_assinatura')
raw_id_fields = ('casa_legislativa',) raw_id_fields = ('casa_legislativa',)
get_queryset = queryset_ascii get_queryset = queryset_ascii
search_fields = ('id', 'search_text', 'casa_legislativa__sigla', search_fields = ('id', 'casa_legislativa__search_text',
'num_processo_sf', 'num_convenio') 'casa_legislativa__sigla', 'num_processo_sf',
'num_convenio')
def get_uf(self, obj): def get_uf(self, obj):
return obj.casa_legislativa.municipio.uf.sigla return obj.casa_legislativa.municipio.uf.sigla

18
sigi/apps/convenios/migrations/0015_remove_convenio_search_text.py

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('convenios', '0014_gescon'),
]
operations = [
migrations.RemoveField(
model_name='convenio',
name='search_text',
),
]

1
sigi/apps/convenios/models.py

@ -54,7 +54,6 @@ class Convenio(models.Model):
verbose_name=_(u'órgão conveniado') verbose_name=_(u'órgão conveniado')
) )
# campo de busca em caixa baixa e sem acentos # campo de busca em caixa baixa e sem acentos
search_text = SearchField(field_names=['casa_legislativa'])
projeto = models.ForeignKey( projeto = models.ForeignKey(
Projeto, Projeto,
on_delete=models.PROTECT, on_delete=models.PROTECT,

Loading…
Cancel
Save