From bdde858993c8dfe11eed13e8e165a3097c93df19 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Mon, 8 Aug 2016 17:54:15 -0300 Subject: [PATCH] =?UTF-8?q?Torna=20arquivo=20obrigat=C3=B3rio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0039_auto_20160808_1753.py | 42 +++++++++++++++++++ sapl/materia/models.py | 10 ++--- 2 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 sapl/materia/migrations/0039_auto_20160808_1753.py diff --git a/sapl/materia/migrations/0039_auto_20160808_1753.py b/sapl/materia/migrations/0039_auto_20160808_1753.py new file mode 100644 index 000000000..a7473aa59 --- /dev/null +++ b/sapl/materia/migrations/0039_auto_20160808_1753.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.5 on 2016-08-08 20:53 +from __future__ import unicode_literals + +from django.db import migrations, models +import sapl.materia.models +import sapl.utils + + +class Migration(migrations.Migration): + + dependencies = [ + ('materia', '0038_auto_20160612_1506'), + ] + + operations = [ + migrations.RemoveField( + model_name='proposicao', + name='data_devolucao', + ), + migrations.AddField( + model_name='proposicao', + name='data_incorporação', + field=models.DateTimeField(blank=True, null=True, verbose_name='Data de Incorporação'), + ), + migrations.AlterField( + model_name='proposicao', + name='data_recebimento', + field=models.DateTimeField(blank=True, null=True, verbose_name='Data de Recebimento'), + ), + migrations.AlterField( + model_name='proposicao', + name='status', + field=models.CharField(blank=True, choices=[('E', 'Enviada'), ('R', 'Recebida'), ('I', 'Incorporada')], max_length=1, verbose_name='Status Proposição'), + ), + migrations.AlterField( + model_name='proposicao', + name='texto_original', + field=models.FileField(default='', upload_to=sapl.materia.models.texto_upload_path, validators=[sapl.utils.restringe_tipos_de_arquivo_txt], verbose_name='Texto Original'), + preserve_default=False, + ), + ] diff --git a/sapl/materia/models.py b/sapl/materia/models.py index ca433d7a6..0b74e7b9f 100644 --- a/sapl/materia/models.py +++ b/sapl/materia/models.py @@ -447,10 +447,10 @@ class Proposicao(models.Model): data_envio = models.DateTimeField( null=True, blank=True, verbose_name=_('Data de Envio')) data_recebimento = models.DateTimeField( - blank=True, null=True, verbose_name=_('Data de Incorporação')) + blank=True, null=True, verbose_name=_('Data de Recebimento')) descricao = models.TextField(max_length=100, verbose_name=_('Descrição')) - data_devolucao = models.DateTimeField( - blank=True, null=True, verbose_name=_('Data de devolução')) + data_incorporação = models.DateTimeField( + blank=True, null=True, verbose_name=_('Data de Incorporação')) justificativa_devolucao = models.CharField( max_length=200, blank=True, @@ -461,7 +461,7 @@ class Proposicao(models.Model): status = models.CharField(blank=True, max_length=1, choices=(('E', 'Enviada'), - ('D', 'Devolvida'), + ('R', 'Recebida'), ('I', 'Incorporada')), verbose_name=_('Status Proposição')) # mutually exclusive (depend on tipo.materia_ou_documento) @@ -470,8 +470,6 @@ class Proposicao(models.Model): documento = models.ForeignKey( DocumentoAcessorio, blank=True, null=True, verbose_name=_('Documento')) texto_original = models.FileField( - blank=True, - null=True, upload_to=texto_upload_path, verbose_name=_('Texto Original'), validators=[restringe_tipos_de_arquivo_txt])