From 2b6d1eb3de91362657a15a52d18b4f6626039cc5 Mon Sep 17 00:00:00 2001 From: LeandroRoberto Date: Tue, 31 Oct 2017 13:47:00 -0200 Subject: [PATCH] =?UTF-8?q?Add=20valor=20padr=C3=A3o=20em=20model=20da=20a?= =?UTF-8?q?pp=20compila=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0004_auto_20171031_1327.py | 25 +++++++++++++++++++ sapl/compilacao/models.py | 6 ++--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 sapl/compilacao/migrations/0004_auto_20171031_1327.py diff --git a/sapl/compilacao/migrations/0004_auto_20171031_1327.py b/sapl/compilacao/migrations/0004_auto_20171031_1327.py new file mode 100644 index 000000000..f5820c6a8 --- /dev/null +++ b/sapl/compilacao/migrations/0004_auto_20171031_1327.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.13 on 2017-10-31 15:27 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('compilacao', '0003_auto_20170825_1136'), + ] + + operations = [ + migrations.AlterField( + model_name='tipotextoarticulado', + name='participacao_social', + field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], default=False, verbose_name='Participação Social'), + ), + migrations.AlterField( + model_name='tipotextoarticulado', + name='publicacao_func', + field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], default=False, verbose_name='Histórico de Publicação'), + ), + ] diff --git a/sapl/compilacao/models.py b/sapl/compilacao/models.py index 9f38b5def..e4be0762b 100644 --- a/sapl/compilacao/models.py +++ b/sapl/compilacao/models.py @@ -1,5 +1,4 @@ -import reversion from django.contrib import messages from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType @@ -13,6 +12,7 @@ from django.utils import timezone from django.utils.decorators import classonlymethod from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _ +import reversion from sapl.compilacao.utils import (get_integrations_view_names, int_to_letter, int_to_roman) @@ -115,13 +115,13 @@ class TipoTextoArticulado(models.Model): on_delete=models.SET_NULL, verbose_name=_('Modelo Integrado')) participacao_social = models.BooleanField( - blank=False, + blank=False, default=False, choices=YES_NO_CHOICES, verbose_name=_('Participação Social')) publicacao_func = models.BooleanField( choices=YES_NO_CHOICES, - blank=False, + blank=False, default=False, verbose_name=_('Histórico de Publicação')) perfis = models.ManyToManyField(