Browse Source

Define valor default para todos os campos booleanos nos models

pull/2255/head
VictorFabreF 6 years ago
committed by Leandro Roberto da Silva
parent
commit
c5bd462b07
  1. 25
      sapl/comissoes/migrations/0018_auto_20180924_1724.py
  2. 5
      sapl/comissoes/models.py
  3. 20
      sapl/compilacao/migrations/0008_auto_20180924_1724.py
  4. 2
      sapl/compilacao/models.py
  5. 25
      sapl/materia/migrations/0031_auto_20180924_1724.py
  6. 6
      sapl/materia/models.py
  7. 20
      sapl/parlamentares/migrations/0025_auto_20180924_1724.py
  8. 2
      sapl/parlamentares/models.py
  9. 25
      sapl/protocoloadm/migrations/0007_auto_20180924_1724.py
  10. 5
      sapl/protocoloadm/models.py

25
sapl/comissoes/migrations/0018_auto_20180924_1724.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-09-24 20:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('comissoes', '0017_auto_20180717_0827'),
]
operations = [
migrations.AlterField(
model_name='cargocomissao',
name='unico',
field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], default=True, verbose_name='Único'),
),
migrations.AlterField(
model_name='comissao',
name='unidade_deliberativa',
field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], default=False, verbose_name='Unidade Deliberativa'),
),
]

5
sapl/comissoes/models.py

@ -75,7 +75,8 @@ class Comissao(models.Model):
verbose_name=_('E-mail'))
unidade_deliberativa = models.BooleanField(
choices=YES_NO_CHOICES,
verbose_name=_('Unidade Deliberativa'))
verbose_name=_('Unidade Deliberativa'),
default=False)
ativa = models.BooleanField(
default=False,
choices=YES_NO_CHOICES,
@ -121,7 +122,7 @@ class Periodo(models.Model): # PeriodoCompComissao
class CargoComissao(models.Model):
nome = models.CharField(max_length=50, verbose_name=_('Cargo'))
unico = models.BooleanField(
choices=YES_NO_CHOICES, verbose_name=_('Único'))
choices=YES_NO_CHOICES, verbose_name=_('Único'), default=True)
class Meta:
verbose_name = _('Cargo de Comissão')

20
sapl/compilacao/migrations/0008_auto_20180924_1724.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-09-24 20:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('compilacao', '0007_auto_20180911_1600'),
]
operations = [
migrations.AlterField(
model_name='tipodispositivo',
name='contagem_continua',
field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], default=False, verbose_name='Contagem contínua'),
),
]

2
sapl/compilacao/models.py

@ -657,7 +657,7 @@ class TipoDispositivo(BaseModel):
blank=True,
verbose_name=_('Sufixo html da nota automática'))
contagem_continua = models.BooleanField(
choices=YES_NO_CHOICES, verbose_name=_('Contagem contínua'))
choices=YES_NO_CHOICES, verbose_name=_('Contagem contínua'), default=False)
dispositivo_de_articulacao = models.BooleanField(
choices=YES_NO_CHOICES,
default=False,

25
sapl/materia/migrations/0031_auto_20180924_1724.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-09-24 20:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('materia', '0030_tramitacao_timestamp'),
]
operations = [
migrations.AlterField(
model_name='orgao',
name='unidade_deliberativa',
field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], default=False, verbose_name='Unidade Deliberativa'),
),
migrations.AlterField(
model_name='tramitacao',
name='urgente',
field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], default=False, verbose_name='Urgente ?'),
),
]

6
sapl/materia/models.py

@ -557,7 +557,8 @@ class Orgao(models.Model):
sigla = models.CharField(max_length=10, verbose_name=_('Sigla'))
unidade_deliberativa = models.BooleanField(
choices=YES_NO_CHOICES,
verbose_name=(_('Unidade Deliberativa')))
verbose_name=(_('Unidade Deliberativa')),
default=False)
endereco = models.CharField(
max_length=100, blank=True, verbose_name=_('Endereço'))
telefone = models.CharField(
@ -929,7 +930,8 @@ class Tramitacao(models.Model):
on_delete=models.PROTECT,
verbose_name=_('Unidade Destino'))
urgente = models.BooleanField(verbose_name=_('Urgente ?'),
choices=YES_NO_CHOICES)
choices=YES_NO_CHOICES,
default=False)
turno = models.CharField(
max_length=1, blank=True, verbose_name=_('Turno'),
choices=TURNO_CHOICES)

20
sapl/parlamentares/migrations/0025_auto_20180924_1724.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-09-24 20:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('parlamentares', '0024_auto_20180814_1237'),
]
operations = [
migrations.AlterField(
model_name='cargomesa',
name='unico',
field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], default=True, verbose_name='Cargo Único'),
),
]

2
sapl/parlamentares/models.py

@ -475,7 +475,7 @@ class CargoMesa(models.Model):
descricao = models.CharField(
max_length=50, verbose_name=_('Cargo na Mesa'))
unico = models.BooleanField(
choices=YES_NO_CHOICES, verbose_name=_('Cargo Único'))
choices=YES_NO_CHOICES, verbose_name=_('Cargo Único'), default=True)
class Meta:
verbose_name = _('Cargo na Mesa')

25
sapl/protocoloadm/migrations/0007_auto_20180924_1724.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-09-24 20:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('protocoloadm', '0006_documentoadministrativo_restrito'),
]
operations = [
migrations.AlterField(
model_name='documentoadministrativo',
name='tramitacao',
field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], default=False, verbose_name='Em Tramitação?'),
),
migrations.AlterField(
model_name='protocolo',
name='anulado',
field=models.BooleanField(default=False),
),
]

5
sapl/protocoloadm/models.py

@ -89,7 +89,7 @@ class Protocolo(models.Model):
blank=True, null=True, verbose_name=_('Número de Páginas'))
observacao = models.TextField(
blank=True, verbose_name=_('Observação'))
anulado = models.BooleanField()
anulado = models.BooleanField(default=False)
user_anulacao = models.CharField(max_length=20, blank=True)
ip_anulacao = models.CharField(max_length=15, blank=True)
justificativa_anulacao = models.CharField(
@ -135,7 +135,8 @@ class DocumentoAdministrativo(models.Model):
blank=True, null=True, verbose_name=_('Data Fim Prazo'))
tramitacao = models.BooleanField(
verbose_name=_('Em Tramitação?'),
choices=YES_NO_CHOICES)
choices=YES_NO_CHOICES,
default=False)
assunto = models.TextField(verbose_name=_('Assunto'))
numero_externo = models.PositiveIntegerField(
blank=True,

Loading…
Cancel
Save