Browse Source

Torna arquivo obrigatório

pull/527/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
committed by Edward Ribeiro
parent
commit
bdde858993
  1. 42
      sapl/materia/migrations/0039_auto_20160808_1753.py
  2. 10
      sapl/materia/models.py

42
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,
),
]

10
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])

Loading…
Cancel
Save