From 252c36ddb7139219d66f87a901597193d93d4db0 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Fri, 16 Sep 2016 10:31:15 -0300 Subject: [PATCH] =?UTF-8?q?Indexa=20campo=20'Ativo'=20de=20Parlamentar=20p?= =?UTF-8?q?orque=20v=C3=A1rias=20de=20nossas=20consultas=20filtram=20por?= =?UTF-8?q?=20ele.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0025_auto_20160916_1030.py | 20 +++++++++++++++++++ sapl/parlamentares/models.py | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 sapl/parlamentares/migrations/0025_auto_20160916_1030.py diff --git a/sapl/parlamentares/migrations/0025_auto_20160916_1030.py b/sapl/parlamentares/migrations/0025_auto_20160916_1030.py new file mode 100644 index 000000000..7a8f3fabe --- /dev/null +++ b/sapl/parlamentares/migrations/0025_auto_20160916_1030.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-09-16 13:30 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('parlamentares', '0024_merge'), + ] + + operations = [ + migrations.AlterField( + model_name='parlamentar', + name='ativo', + field=models.BooleanField(db_index=True, verbose_name='Ativo na Casa?'), + ), + ] diff --git a/sapl/parlamentares/models.py b/sapl/parlamentares/models.py index 1dd4db07f..735fc447f 100644 --- a/sapl/parlamentares/models.py +++ b/sapl/parlamentares/models.py @@ -244,7 +244,8 @@ class Parlamentar(models.Model): max_length=100, blank=True, verbose_name=_('Locais de Atuação')) - ativo = models.BooleanField(verbose_name=_('Ativo na Casa?')) + ativo = models.BooleanField(db_index=True, + verbose_name=_('Ativo na Casa?')) biografia = models.TextField( blank=True, verbose_name=_('Biografia')) # XXX Esse atribuito foi colocado aqui para não atrapalhar a migração