Browse Source

Adicionado campo publicar pauta na sessao

AlertaSonoroPainel
Gustavo 3 years ago
parent
commit
0d4e3fec3b
  1. 18
      sapl/sessao/migrations/0060_auto_20220224_1245.py
  2. 18
      sapl/sessao/migrations/0061_sessaoplenaria_publicar_pauta.py
  3. 17
      sapl/sessao/migrations/0062_auto_20220405_1307.py
  4. 6
      sapl/sessao/models.py

18
sapl/sessao/migrations/0060_auto_20220224_1245.py

@ -0,0 +1,18 @@
# Generated by Django 2.2.24 on 2022-02-24 15:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sessao', '0059_sessaoplenaria_data_ultima_atualizacao'),
]
operations = [
migrations.AlterField(
model_name='tiposessaoplenaria',
name='tipo_numeracao',
field=models.PositiveIntegerField(choices=[(1, 'Quinzenal'), (2, 'Mensal'), (5, 'Semestral'), (10, 'Anual'), (11, 'Sessão Legislativa'), (12, 'Legislatura'), (99, 'Numeração Única')], default=11, verbose_name='Tipo de Numeração'),
),
]

18
sapl/sessao/migrations/0061_sessaoplenaria_publicar_pauta.py

@ -0,0 +1,18 @@
# Generated by Django 2.2.24 on 2022-04-05 16:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sessao', '0060_auto_20220224_1245'),
]
operations = [
migrations.AddField(
model_name='sessaoplenaria',
name='publicar_pauta',
field=models.BooleanField(blank=True, default=False, null=True, verbose_name='Publicar Pauta?'),
),
]

17
sapl/sessao/migrations/0062_auto_20220405_1307.py

@ -0,0 +1,17 @@
# Generated by Django 2.2.24 on 2022-04-05 16:07
from django.db import migrations
def publicar_pauta_true_sessoes_existentes(apps, schema_editor):
SessaoPlenaria = apps.get_model('sessao', 'SessaoPlenaria')
SessaoPlenaria.objects.filter(publicar_pauta=False).update(publicar_pauta=True)
class Migration(migrations.Migration):
dependencies = [
('sessao', '0061_sessaoplenaria_publicar_pauta'),
]
operations = [
migrations.RunPython(publicar_pauta_true_sessoes_existentes),
]

6
sapl/sessao/models.py

@ -240,6 +240,12 @@ class SessaoPlenaria(models.Model):
data_ultima_atualizacao = models.DateTimeField( data_ultima_atualizacao = models.DateTimeField(
blank=True, null=True, auto_now=True, verbose_name=_('Data')) blank=True, null=True, auto_now=True, verbose_name=_('Data'))
publicar_pauta = models.BooleanField(
null=True,
blank=True,
default=False,
verbose_name=_('Publicar Pauta?'))
class Meta: class Meta:
verbose_name = _('Sessão Plenária') verbose_name = _('Sessão Plenária')
verbose_name_plural = _('Sessões Plenárias') verbose_name_plural = _('Sessões Plenárias')

Loading…
Cancel
Save