From 094ffca1bdee17e6b4be5269405ef0a8fa2dff7d Mon Sep 17 00:00:00 2001 From: Mariana Mendes Date: Fri, 16 Mar 2018 11:54:28 -0300 Subject: [PATCH] Fix #1766 (#1768) --- sapl/sessao/legacy.yaml | 2 ++ .../migrations/0017_auto_20180316_0731.py | 26 +++++++++++++++++++ sapl/sessao/models.py | 5 ++++ sapl/templates/sessao/layouts.yaml | 1 + 4 files changed, 34 insertions(+) create mode 100644 sapl/sessao/migrations/0017_auto_20180316_0731.py diff --git a/sapl/sessao/legacy.yaml b/sapl/sessao/legacy.yaml index 90188a76c..521a4c173 100644 --- a/sapl/sessao/legacy.yaml +++ b/sapl/sessao/legacy.yaml @@ -44,6 +44,8 @@ AbstractOrador: parlamentar: cod_parlamentar sessao_plenaria: cod_sessao_plen url_discurso: url_discurso + upload_anexo: anexo + Orador (Oradores): {} diff --git a/sapl/sessao/migrations/0017_auto_20180316_0731.py b/sapl/sessao/migrations/0017_auto_20180316_0731.py new file mode 100644 index 000000000..a81456161 --- /dev/null +++ b/sapl/sessao/migrations/0017_auto_20180316_0731.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.13 on 2018-03-16 10:31 +from __future__ import unicode_literals + +from django.db import migrations, models +import sapl.sessao.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('sessao', '0016_auto_20180131_1708'), + ] + + operations = [ + migrations.AddField( + model_name='orador', + name='upload_anexo', + field=models.FileField(blank=True, null=True, upload_to=sapl.sessao.models.anexo_upload_path, verbose_name='Anexo do Orador'), + ), + migrations.AddField( + model_name='oradorexpediente', + name='upload_anexo', + field=models.FileField(blank=True, null=True, upload_to=sapl.sessao.models.anexo_upload_path, verbose_name='Anexo do Orador'), + ), + ] diff --git a/sapl/sessao/models.py b/sapl/sessao/models.py index f4f25cc14..49448eecc 100644 --- a/sapl/sessao/models.py +++ b/sapl/sessao/models.py @@ -320,6 +320,11 @@ class AbstractOrador(models.Model): # Oradores max_length=150, blank=True, verbose_name=_('URL Vídeo')) observacao = models.CharField( max_length=150, blank=True, verbose_name=_('Observação')) + upload_anexo = models.FileField( + blank=True, + null=True, + upload_to=anexo_upload_path, + verbose_name=_('Anexo do Orador')) class Meta: abstract = True diff --git a/sapl/templates/sessao/layouts.yaml b/sapl/templates/sessao/layouts.yaml index 53caa2db1..99780bb22 100644 --- a/sapl/templates/sessao/layouts.yaml +++ b/sapl/templates/sessao/layouts.yaml @@ -36,6 +36,7 @@ OradorExpediente: {% trans 'Orador do Expediente' %}: - numero_ordem parlamentar - url_discurso observacao + - upload_anexo ExpedienteMateria: {% trans 'Matéria do Expediente' %}: