diff --git a/sapl/audiencia/migrations/0012_auto_20191001_1115.py b/sapl/audiencia/migrations/0012_auto_20191001_1115.py new file mode 100644 index 000000000..b953ca0bb --- /dev/null +++ b/sapl/audiencia/migrations/0012_auto_20191001_1115.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-10-01 14:15 +from __future__ import unicode_literals + +from django.db import migrations, models +import sapl.audiencia.models +import sapl.utils + + +class Migration(migrations.Migration): + + dependencies = [ + ('audiencia', '0011_auto_20190712_1053'), + ] + + operations = [ + migrations.AlterField( + model_name='anexoaudienciapublica', + name='arquivo', + field=models.FileField(max_length=200, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.utils.texto_upload_path, verbose_name='Arquivo'), + ), + migrations.AlterField( + model_name='audienciapublica', + name='upload_anexo', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.audiencia.models.anexo_upload_path, verbose_name='Anexo da Audiência Pública'), + ), + migrations.AlterField( + model_name='audienciapublica', + name='upload_ata', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.audiencia.models.ata_upload_path, validators=[sapl.utils.restringe_tipos_de_arquivo_txt], verbose_name='Ata da Audiência Pública'), + ), + migrations.AlterField( + model_name='audienciapublica', + name='upload_pauta', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.audiencia.models.pauta_upload_path, validators=[sapl.utils.restringe_tipos_de_arquivo_txt], verbose_name='Pauta da Audiência Pública'), + ), + ] diff --git a/sapl/audiencia/models.py b/sapl/audiencia/models.py index 7dc962e3a..64d92e2c9 100755 --- a/sapl/audiencia/models.py +++ b/sapl/audiencia/models.py @@ -87,6 +87,7 @@ class AudienciaPublica(models.Model): max_length=150, blank=True, verbose_name=_('URL Arquivo Vídeo (Formatos MP4 / FLV / WebM)')) upload_pauta = models.FileField( + max_length=200, blank=True, null=True, upload_to=pauta_upload_path, @@ -94,6 +95,7 @@ class AudienciaPublica(models.Model): verbose_name=_('Pauta da Audiência Pública'), validators=[restringe_tipos_de_arquivo_txt]) upload_ata = models.FileField( + max_length=200, blank=True, null=True, upload_to=ata_upload_path, @@ -101,6 +103,7 @@ class AudienciaPublica(models.Model): storage=OverwriteStorage(), validators=[restringe_tipos_de_arquivo_txt]) upload_anexo = models.FileField( + max_length=200, blank=True, null=True, upload_to=anexo_upload_path, @@ -159,6 +162,7 @@ class AnexoAudienciaPublica(models.Model): audiencia = models.ForeignKey(AudienciaPublica, on_delete=models.PROTECT) arquivo = models.FileField( + max_length=200, upload_to=texto_upload_path, storage=OverwriteStorage(), verbose_name=_('Arquivo')) diff --git a/sapl/comissoes/migrations/0021_auto_20191001_1115.py b/sapl/comissoes/migrations/0021_auto_20191001_1115.py new file mode 100644 index 000000000..24e7f655b --- /dev/null +++ b/sapl/comissoes/migrations/0021_auto_20191001_1115.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-10-01 14:15 +from __future__ import unicode_literals + +from django.db import migrations, models +import sapl.comissoes.models +import sapl.utils + + +class Migration(migrations.Migration): + + dependencies = [ + ('comissoes', '0020_auto_20190712_1053'), + ] + + operations = [ + migrations.AlterField( + model_name='documentoacessorio', + name='arquivo', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.comissoes.models.anexo_upload_path, validators=[sapl.utils.restringe_tipos_de_arquivo_txt], verbose_name='Texto Integral'), + ), + migrations.AlterField( + model_name='reuniao', + name='upload_anexo', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.comissoes.models.anexo_upload_path, verbose_name='Anexo da Reunião'), + ), + migrations.AlterField( + model_name='reuniao', + name='upload_ata', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.comissoes.models.ata_upload_path, validators=[sapl.utils.restringe_tipos_de_arquivo_txt], verbose_name='Ata da Reunião'), + ), + migrations.AlterField( + model_name='reuniao', + name='upload_pauta', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.comissoes.models.pauta_upload_path, validators=[sapl.utils.restringe_tipos_de_arquivo_txt], verbose_name='Pauta da Reunião'), + ), + ] diff --git a/sapl/comissoes/models.py b/sapl/comissoes/models.py index 467716213..aabde6f73 100644 --- a/sapl/comissoes/models.py +++ b/sapl/comissoes/models.py @@ -236,18 +236,21 @@ class Reuniao(models.Model): max_length=150, blank=True, verbose_name=_('URL do Arquivo de Vídeo (Formatos MP4 / FLV / WebM)')) upload_pauta = models.FileField( + max_length=200, blank=True, null=True, upload_to=pauta_upload_path, verbose_name=_('Pauta da Reunião'), storage=OverwriteStorage(), validators=[restringe_tipos_de_arquivo_txt]) upload_ata = models.FileField( + max_length=200, blank=True, null=True, upload_to=ata_upload_path, verbose_name=_('Ata da Reunião'), storage=OverwriteStorage(), validators=[restringe_tipos_de_arquivo_txt]) upload_anexo = models.FileField( + max_length=200, blank=True, null=True, upload_to=anexo_upload_path, storage=OverwriteStorage(), @@ -313,6 +316,7 @@ class DocumentoAcessorio(models.Model): ementa = models.TextField(blank=True, verbose_name=_('Ementa')) indexacao = models.TextField(blank=True) arquivo = models.FileField( + max_length=200, blank=True, null=True, upload_to=anexo_upload_path, diff --git a/sapl/materia/migrations/0058_auto_20191001_1115.py b/sapl/materia/migrations/0058_auto_20191001_1115.py new file mode 100644 index 000000000..88b375b42 --- /dev/null +++ b/sapl/materia/migrations/0058_auto_20191001_1115.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-10-01 14:15 +from __future__ import unicode_literals + +from django.db import migrations, models +import sapl.materia.models +import sapl.utils + + +class Migration(migrations.Migration): + + dependencies = [ + ('materia', '0057_materiaemtramitacao'), + ] + + operations = [ + migrations.AlterField( + model_name='materialegislativa', + name='texto_original', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.materia.models.materia_upload_path, validators=[sapl.utils.restringe_tipos_de_arquivo_txt], verbose_name='Texto Original'), + ), + migrations.AlterField( + model_name='proposicao', + name='texto_original', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.materia.models.materia_upload_path, validators=[sapl.utils.restringe_tipos_de_arquivo_txt], verbose_name='Texto Original'), + ), + ] diff --git a/sapl/materia/models.py b/sapl/materia/models.py index 9699aeeec..cdc089b3b 100644 --- a/sapl/materia/models.py +++ b/sapl/materia/models.py @@ -257,6 +257,7 @@ class MateriaLegislativa(models.Model): 'materia_principal', 'materia_anexada')) texto_original = models.FileField( + max_length=200, blank=True, null=True, upload_to=materia_upload_path, @@ -802,6 +803,7 @@ class Proposicao(models.Model): ('I', 'Incorporada')), verbose_name=_('Status Proposição')) texto_original = models.FileField( + max_length=200, upload_to=materia_upload_path, blank=True, null=True, diff --git a/sapl/norma/migrations/0027_auto_20191001_1115.py b/sapl/norma/migrations/0027_auto_20191001_1115.py new file mode 100644 index 000000000..c72cc97fc --- /dev/null +++ b/sapl/norma/migrations/0027_auto_20191001_1115.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-10-01 14:15 +from __future__ import unicode_literals + +from django.db import migrations, models +import sapl.norma.models +import sapl.utils + + +class Migration(migrations.Migration): + + dependencies = [ + ('norma', '0026_auto_20190712_1053'), + ] + + operations = [ + migrations.AlterField( + model_name='anexonormajuridica', + name='anexo_arquivo', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.norma.models.norma_upload_path, validators=[sapl.utils.restringe_tipos_de_arquivo_txt], verbose_name='Arquivo Anexo'), + ), + migrations.AlterField( + model_name='normajuridica', + name='texto_integral', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.norma.models.norma_upload_path, validators=[sapl.utils.restringe_tipos_de_arquivo_txt], verbose_name='Texto Integral'), + ), + ] diff --git a/sapl/norma/models.py b/sapl/norma/models.py index 7dc539ef6..925e35a32 100644 --- a/sapl/norma/models.py +++ b/sapl/norma/models.py @@ -79,6 +79,7 @@ class NormaJuridica(models.Model): ) texto_integral = models.FileField( + max_length=200, blank=True, null=True, upload_to=norma_upload_path, @@ -361,6 +362,7 @@ class AnexoNormaJuridica(models.Model): max_length=250 ) anexo_arquivo = models.FileField( + max_length=200, blank=True, null=True, upload_to=norma_upload_path, diff --git a/sapl/protocoloadm/migrations/0025_auto_20191001_1115.py b/sapl/protocoloadm/migrations/0025_auto_20191001_1115.py new file mode 100644 index 000000000..ca35da825 --- /dev/null +++ b/sapl/protocoloadm/migrations/0025_auto_20191001_1115.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-10-01 14:15 +from __future__ import unicode_literals + +from django.db import migrations, models +import sapl.utils + + +class Migration(migrations.Migration): + + dependencies = [ + ('protocoloadm', '0024_merge_20190821_1418'), + ] + + operations = [ + migrations.AlterField( + model_name='documentoacessorioadministrativo', + name='arquivo', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.utils.texto_upload_path, verbose_name='Arquivo'), + ), + migrations.AlterField( + model_name='documentoadministrativo', + name='texto_integral', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.utils.texto_upload_path, verbose_name='Texto Integral'), + ), + ] diff --git a/sapl/protocoloadm/models.py b/sapl/protocoloadm/models.py index 4993b84e7..f45e263d4 100644 --- a/sapl/protocoloadm/models.py +++ b/sapl/protocoloadm/models.py @@ -164,6 +164,7 @@ class DocumentoAdministrativo(models.Model): observacao = models.TextField( blank=True, verbose_name=_('Observação')) texto_integral = models.FileField( + max_length=200, blank=True, null=True, storage=OverwriteStorage(), @@ -229,6 +230,7 @@ class DocumentoAcessorioAdministrativo(models.Model): verbose_name=_('Tipo')) nome = models.CharField(max_length=30, verbose_name=_('Nome')) arquivo = models.FileField( + max_length=200, blank=True, null=True, upload_to=texto_upload_path, diff --git a/sapl/sessao/migrations/0046_auto_20191001_1115.py b/sapl/sessao/migrations/0046_auto_20191001_1115.py new file mode 100644 index 000000000..5b773c293 --- /dev/null +++ b/sapl/sessao/migrations/0046_auto_20191001_1115.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-10-01 14:15 +from __future__ import unicode_literals + +from django.db import migrations, models +import sapl.sessao.models +import sapl.utils + + +class Migration(migrations.Migration): + + dependencies = [ + ('sessao', '0045_auto_20190816_1337'), + ] + + operations = [ + migrations.AlterField( + model_name='justificativaausencia', + name='upload_anexo', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.sessao.models.anexo_upload_path, verbose_name='Anexo de Justificativa'), + ), + migrations.AlterField( + model_name='orador', + name='upload_anexo', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.sessao.models.anexo_upload_path, verbose_name='Anexo do Orador'), + ), + migrations.AlterField( + model_name='oradorexpediente', + name='upload_anexo', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.sessao.models.anexo_upload_path, verbose_name='Anexo do Orador'), + ), + migrations.AlterField( + model_name='oradorordemdia', + name='upload_anexo', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.sessao.models.anexo_upload_path, verbose_name='Anexo do Orador'), + ), + migrations.AlterField( + model_name='sessaoplenaria', + name='upload_anexo', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.sessao.models.anexo_upload_path, verbose_name='Anexo da Sessão'), + ), + migrations.AlterField( + model_name='sessaoplenaria', + name='upload_ata', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.sessao.models.ata_upload_path, validators=[sapl.utils.restringe_tipos_de_arquivo_txt], verbose_name='Ata da Sessão'), + ), + migrations.AlterField( + model_name='sessaoplenaria', + name='upload_pauta', + field=models.FileField(blank=True, max_length=200, null=True, storage=sapl.utils.OverwriteStorage(), upload_to=sapl.sessao.models.pauta_upload_path, validators=[sapl.utils.restringe_tipos_de_arquivo_txt], verbose_name='Pauta da Sessão'), + ), + ] diff --git a/sapl/sessao/models.py b/sapl/sessao/models.py index 58fe5a149..c9143169c 100644 --- a/sapl/sessao/models.py +++ b/sapl/sessao/models.py @@ -127,6 +127,7 @@ class SessaoPlenaria(models.Model): max_length=150, blank=True, verbose_name=_('URL Arquivo Vídeo (Formatos MP4 / FLV / WebM)')) upload_pauta = models.FileField( + max_length=200, blank=True, null=True, upload_to=pauta_upload_path, @@ -134,6 +135,7 @@ class SessaoPlenaria(models.Model): storage=OverwriteStorage(), validators=[restringe_tipos_de_arquivo_txt]) upload_ata = models.FileField( + max_length=200, blank=True, null=True, upload_to=ata_upload_path, @@ -141,6 +143,7 @@ class SessaoPlenaria(models.Model): verbose_name=_('Ata da Sessão'), validators=[restringe_tipos_de_arquivo_txt]) upload_anexo = models.FileField( + max_length=200, blank=True, null=True, storage=OverwriteStorage(), @@ -372,6 +375,7 @@ class AbstractOrador(models.Model): # Oradores observacao = models.CharField( max_length=150, blank=True, verbose_name=_('Observação')) upload_anexo = models.FileField( + max_length=200, blank=True, null=True, storage=OverwriteStorage(), @@ -715,6 +719,7 @@ class JustificativaAusencia(models.Model): OrdemDia, blank=True, verbose_name=_('Matérias do Ordem do Dia')) upload_anexo = models.FileField( + max_length=200, blank=True, null=True, storage=OverwriteStorage(),