Browse Source

Add valor padrão em model da app compilação

pull/1573/head
LeandroRoberto 7 years ago
parent
commit
2b6d1eb3de
  1. 25
      sapl/compilacao/migrations/0004_auto_20171031_1327.py
  2. 6
      sapl/compilacao/models.py

25
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'),
),
]

6
sapl/compilacao/models.py

@ -1,5 +1,4 @@
import reversion
from django.contrib import messages from django.contrib import messages
from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType 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.decorators import classonlymethod
from django.utils.encoding import force_text from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
import reversion
from sapl.compilacao.utils import (get_integrations_view_names, int_to_letter, from sapl.compilacao.utils import (get_integrations_view_names, int_to_letter,
int_to_roman) int_to_roman)
@ -115,13 +115,13 @@ class TipoTextoArticulado(models.Model):
on_delete=models.SET_NULL, on_delete=models.SET_NULL,
verbose_name=_('Modelo Integrado')) verbose_name=_('Modelo Integrado'))
participacao_social = models.BooleanField( participacao_social = models.BooleanField(
blank=False, blank=False, default=False,
choices=YES_NO_CHOICES, choices=YES_NO_CHOICES,
verbose_name=_('Participação Social')) verbose_name=_('Participação Social'))
publicacao_func = models.BooleanField( publicacao_func = models.BooleanField(
choices=YES_NO_CHOICES, choices=YES_NO_CHOICES,
blank=False, blank=False, default=False,
verbose_name=_('Histórico de Publicação')) verbose_name=_('Histórico de Publicação'))
perfis = models.ManyToManyField( perfis = models.ManyToManyField(

Loading…
Cancel
Save