diff --git a/sapl/comissoes/legacy.yaml b/sapl/comissoes/legacy.yaml index 66ed8b060..a1093c4d2 100644 --- a/sapl/comissoes/legacy.yaml +++ b/sapl/comissoes/legacy.yaml @@ -25,6 +25,7 @@ Comissao: telefone_secretaria: num_tel_secretaria tipo: tip_comissao unidade_deliberativa: ind_unid_deliberativa + ativa: Periodo (PeriodoCompComissao): data_fim: dat_fim_periodo diff --git a/sapl/comissoes/migrations/0006_auto_20160825_1335.py b/sapl/comissoes/migrations/0006_auto_20160825_1335.py new file mode 100644 index 000000000..f165a94ea --- /dev/null +++ b/sapl/comissoes/migrations/0006_auto_20160825_1335.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-08-25 16:35 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('comissoes', '0005_comissao_ativa'), + ] + + operations = [ + migrations.AlterField( + model_name='comissao', + name='ativa', + field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], default=False, verbose_name='Comissão Ativa?'), + ), + ] diff --git a/sapl/comissoes/models.py b/sapl/comissoes/models.py index 3be814355..22124f917 100644 --- a/sapl/comissoes/models.py +++ b/sapl/comissoes/models.py @@ -74,6 +74,7 @@ class Comissao(models.Model): choices=YES_NO_CHOICES, verbose_name=_('Unidade Deliberativa')) ativa = models.BooleanField( + default=False, choices=YES_NO_CHOICES, default=True, verbose_name=_('Comissão Ativa?')) diff --git a/sapl/materia/forms.py b/sapl/materia/forms.py index b3eecfa1c..bccddeb5e 100644 --- a/sapl/materia/forms.py +++ b/sapl/materia/forms.py @@ -666,6 +666,11 @@ class AutorForm(ModelForm): required=True, label=_('Confirmar Email')) + username = forms.CharField( + required=True, + max_length=50 + ) + class Meta: model = Autor fields = ['username', diff --git a/sapl/materia/legacy.yaml b/sapl/materia/legacy.yaml index afcd1b70b..899d1b72a 100644 --- a/sapl/materia/legacy.yaml +++ b/sapl/materia/legacy.yaml @@ -63,6 +63,7 @@ Autor: partido: cod_partido tipo: tip_autor username: col_username + user: Autoria: autor: cod_autor diff --git a/sapl/materia/migrations/0046_auto_20160825_1504.py b/sapl/materia/migrations/0046_auto_20160825_1504.py new file mode 100644 index 000000000..26e078d05 --- /dev/null +++ b/sapl/materia/migrations/0046_auto_20160825_1504.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-08-25 18:04 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('materia', '0045_auto_20160823_1658'), + ] + + operations = [ + migrations.AlterField( + model_name='autor', + name='user', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/sapl/materia/migrations/0047_merge.py b/sapl/materia/migrations/0047_merge.py new file mode 100644 index 000000000..dd4fbdfa2 --- /dev/null +++ b/sapl/materia/migrations/0047_merge.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-08-29 16:45 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('materia', '0046_auto_20160825_1833'), + ('materia', '0046_auto_20160825_1504'), + ] + + operations = [ + ] diff --git a/sapl/materia/models.py b/sapl/materia/models.py index 26380163c..ac179f714 100644 --- a/sapl/materia/models.py +++ b/sapl/materia/models.py @@ -208,9 +208,7 @@ class TipoAutor(models.Model): class Autor(models.Model): - user = models.ForeignKey(User, - blank=True, - null=True) + user = models.ForeignKey(User, blank=True, null=True) partido = models.ForeignKey(Partido, blank=True, null=True) comissao = models.ForeignKey(Comissao, blank=True, null=True) parlamentar = models.ForeignKey(Parlamentar, blank=True, null=True) diff --git a/sapl/protocoloadm/legacy.yaml b/sapl/protocoloadm/legacy.yaml index 3497770d2..3772d2f6d 100644 --- a/sapl/protocoloadm/legacy.yaml +++ b/sapl/protocoloadm/legacy.yaml @@ -59,6 +59,5 @@ TramitacaoAdministrativo: documento: cod_documento status: cod_status texto: txt_tramitacao - ultima: ind_ult_tramitacao unidade_tramitacao_destino: cod_unid_tram_dest unidade_tramitacao_local: cod_unid_tram_local diff --git a/scripts/anonimizador/anon.py b/scripts/anonimizador/anon.py index 2711f0114..98618cee7 100644 --- a/scripts/anonimizador/anon.py +++ b/scripts/anonimizador/anon.py @@ -23,9 +23,9 @@ models = [m for m in models m not in excluidos and m._meta.app_label not in ['compilacao', 'base']] -nomes = [n.strip() for n in open('nomes.txt').readlines()] +nomes = [n.strip() for n in open('scripts/anonimizador/nomes.txt').readlines()] -conteudo = open('paragrafos.txt').read() +conteudo = open('scripts/anonimizador/paragrafos.txt').read() pars_list = [p.replace('"', '') for p in re.split('\n\n+', conteudo.strip())] pars = defaultdict(list) for p in pars_list: