From 8304b327334d2c458eabfc95ad6f363121909809 Mon Sep 17 00:00:00 2001 From: AndreSouto Date: Mon, 1 Oct 2018 14:47:09 -0300 Subject: [PATCH 01/20] Fixes #2030 --- .../templates/pdf_sessao_plenaria_gerar.py | 28 +++++++- sapl/relatorios/views.py | 37 ++++++++-- sapl/rules/map_rules.py | 41 +++++------ sapl/sessao/forms.py | 11 ++- .../migrations/0024_ocorrenciasessao.py | 28 ++++++++ .../migrations/0025_auto_20180919_1116.py | 21 ++++++ sapl/sessao/models.py | 15 ++++ sapl/sessao/urls.py | 6 +- sapl/sessao/views.py | 69 +++++++++++++++++-- .../blocos_resumo/ocorrencias_da_sessao.html | 6 ++ sapl/templates/sessao/ocorrencia_sessao.html | 32 +++++++++ sapl/templates/sessao/resumo.html | 2 + sapl/templates/sessao/subnav.yaml | 2 + 13 files changed, 261 insertions(+), 37 deletions(-) create mode 100644 sapl/sessao/migrations/0024_ocorrenciasessao.py create mode 100644 sapl/sessao/migrations/0025_auto_20180919_1116.py create mode 100644 sapl/templates/sessao/blocos_resumo/ocorrencias_da_sessao.html create mode 100644 sapl/templates/sessao/ocorrencia_sessao.html diff --git a/sapl/relatorios/templates/pdf_sessao_plenaria_gerar.py b/sapl/relatorios/templates/pdf_sessao_plenaria_gerar.py index 1c01bfb08..1f0f6482c 100644 --- a/sapl/relatorios/templates/pdf_sessao_plenaria_gerar.py +++ b/sapl/relatorios/templates/pdf_sessao_plenaria_gerar.py @@ -6,6 +6,9 @@ """ import time +from django.template.defaultfilters import safe +from django.utils.html import strip_tags + from sapl.sessao.models import ResumoOrdenacao from trml2pdf import parseString @@ -284,7 +287,25 @@ def oradores(lst_oradores): return tmp -def principal(cabecalho_dic, rodape_dic, imagem, sessao, inf_basicas_dic, lst_mesa, lst_presenca_sessao, lst_expedientes, lst_expediente_materia, lst_oradores_expediente, lst_presenca_ordem_dia, lst_votacao, lst_oradores): +def ocorrencias(lst_ocorrencias): + """ + + """ + tmp = '' + tmp += '\t\tOcorrências da Sessão\n' + tmp += '\t\t\n' + tmp += '\t\t\t \n' + tmp += '\t\t\n' + for idx, ocorrencia in enumerate(lst_ocorrencias): + tmp += '\t\t' + \ + str(ocorrencia.conteudo) + '\n' + tmp += '\t\t\n' + tmp += '\t\t\t \n' + tmp += '\t\t\n' + return tmp + + +def principal(cabecalho_dic, rodape_dic, imagem, sessao, inf_basicas_dic, lst_mesa, lst_presenca_sessao, lst_expedientes, lst_expediente_materia, lst_oradores_expediente, lst_presenca_ordem_dia, lst_votacao, lst_oradores, lst_ocorrencias): """ """ arquivoPdf = str(int(time.time() * 100)) + ".pdf" @@ -316,7 +337,8 @@ def principal(cabecalho_dic, rodape_dic, imagem, sessao, inf_basicas_dic, lst_me 'mat_o_d': votacao(lst_votacao), 'mesa_d': mesa(lst_mesa), 'oradores_exped': oradores_expediente(lst_oradores_expediente), - 'oradores_expli': oradores(lst_oradores) + 'oradores_expli': oradores(lst_oradores), + 'ocorr_sessao': ocorrencias(lst_ocorrencias) } if ordenacao: @@ -330,6 +352,7 @@ def principal(cabecalho_dic, rodape_dic, imagem, sessao, inf_basicas_dic, lst_me tmp += dict_ord_template[ordenacao.oitavo] tmp += dict_ord_template[ordenacao.nono] tmp += dict_ord_template[ordenacao.decimo] + else: tmp += inf_basicas(inf_basicas_dic) tmp += mesa(lst_mesa) @@ -340,6 +363,7 @@ def principal(cabecalho_dic, rodape_dic, imagem, sessao, inf_basicas_dic, lst_me tmp += presenca_ordem_dia(lst_presenca_ordem_dia) tmp += votacao(lst_votacao) tmp += oradores(lst_oradores) + tmp += ocorrencias(lst_ocorrencias) tmp += '\t\n' tmp += '\n' diff --git a/sapl/relatorios/views.py b/sapl/relatorios/views.py index a7af13150..676eb0961 100644 --- a/sapl/relatorios/views.py +++ b/sapl/relatorios/views.py @@ -17,7 +17,7 @@ from sapl.protocoloadm.models import (DocumentoAdministrativo, Protocolo, from sapl.sessao.models import (ExpedienteMateria, ExpedienteSessao, IntegranteMesa, Orador, OradorExpediente, OrdemDia, PresencaOrdemDia, SessaoPlenaria, - SessaoPlenariaPresenca) + SessaoPlenariaPresenca, OcorrenciaSessao) from sapl.settings import STATIC_ROOT from sapl.utils import LISTA_DE_UFS, ExtraiTag, TrocaTag, filiacao_data @@ -514,13 +514,13 @@ def get_sessao_plenaria(sessao, casa): dic_presenca['sgl_partido'] = partido_sigla lst_presenca_sessao.append(dic_presenca) + # Exibe os Expedientes lst_expedientes = [] expedientes = ExpedienteSessao.objects.filter( sessao_plenaria=sessao).order_by('tipo__nome') for e in expedientes: - dic_expedientes = {} dic_expedientes["nom_expediente"] = e.tipo.nome conteudo = e.conteudo @@ -539,6 +539,7 @@ def get_sessao_plenaria(sessao, casa): if dic_expedientes: lst_expedientes.append(dic_expedientes) + # Lista das matérias do Expediente, incluindo o resultado das votacoes lst_expediente_materia = [] for expediente_materia in ExpedienteMateria.objects.filter( @@ -727,6 +728,28 @@ def get_sessao_plenaria(sessao, casa): dic_oradores['sgl_partido'] = sigla lst_oradores.append(dic_oradores) + # Ocorrências da Sessão + lst_ocorrencias = [] + ocorrencias = OcorrenciaSessao.objects.filter( + sessao_plenaria=sessao) + + for o in ocorrencias: + conteudo = o.conteudo + + # unescape HTML codes + # https://github.com/interlegis/sapl/issues/1046 + conteudo = re.sub('style=".*?"', '', conteudo) + conteudo = html.unescape(conteudo) + + # escape special character '&' + # https://github.com/interlegis/sapl/issues/1009 + conteudo = conteudo.replace('&', '&') + + o.conteudo = conteudo + + lst_ocorrencias.append(o) + + return (inf_basicas_dic, lst_mesa, lst_presenca_sessao, @@ -735,7 +758,8 @@ def get_sessao_plenaria(sessao, casa): lst_oradores_expediente, lst_presenca_ordem_dia, lst_votacao, - lst_oradores) + lst_oradores, + lst_ocorrencias) def get_turno(dic, materia, sessao_data_inicio): @@ -794,7 +818,9 @@ def relatorio_sessao_plenaria(request, pk): lst_oradores_expediente, lst_presenca_ordem_dia, lst_votacao, - lst_oradores) = get_sessao_plenaria(sessao, casa) + lst_oradores, + lst_ocorrencias) = get_sessao_plenaria(sessao, casa) + for idx in range(len(lst_expedientes)): txt_expedientes = lst_expedientes[idx]['txt_expediente'] @@ -815,7 +841,8 @@ def relatorio_sessao_plenaria(request, pk): lst_oradores_expediente, lst_presenca_ordem_dia, lst_votacao, - lst_oradores) + lst_oradores, + lst_ocorrencias) response.write(pdf) return response diff --git a/sapl/rules/map_rules.py b/sapl/rules/map_rules.py index bba114149..fa5a5b324 100644 --- a/sapl/rules/map_rules.py +++ b/sapl/rules/map_rules.py @@ -1,23 +1,3 @@ -from sapl.base import models as base -from sapl.comissoes import models as comissoes -from sapl.compilacao import models as compilacao -from sapl.lexml import models as lexml -from sapl.materia import models as materia -from sapl.norma import models as norma -from sapl.painel import models as painel -from sapl.parlamentares import models as parlamentares -from sapl.protocoloadm import models as protocoloadm -from sapl.audiencia import models as audiencia -from sapl.rules import (RP_ADD, RP_CHANGE, RP_DELETE, RP_DETAIL, RP_LIST, - SAPL_GROUP_ADMINISTRATIVO, SAPL_GROUP_ANONYMOUS, - SAPL_GROUP_AUTOR, SAPL_GROUP_COMISSOES, - SAPL_GROUP_GERAL, SAPL_GROUP_LOGIN_SOCIAL, - SAPL_GROUP_MATERIA, SAPL_GROUP_NORMA, - SAPL_GROUP_PAINEL, SAPL_GROUP_PARLAMENTAR, - SAPL_GROUP_PROTOCOLO, SAPL_GROUP_SESSAO, - SAPL_GROUP_VOTANTE) -from sapl.sessao import models as sessao - """ Todas as permissões do django framework seguem o padrão @@ -46,6 +26,26 @@ negócio trabalham com os cinco radiais de permissão e com qualquer outro tipo de permissão customizada, nesta ordem de precedência. """ +from sapl.audiencia import models as audiencia +from sapl.base import models as base +from sapl.comissoes import models as comissoes +from sapl.compilacao import models as compilacao +from sapl.lexml import models as lexml +from sapl.materia import models as materia +from sapl.norma import models as norma +from sapl.painel import models as painel +from sapl.parlamentares import models as parlamentares +from sapl.protocoloadm import models as protocoloadm +from sapl.rules import (RP_ADD, RP_CHANGE, RP_DELETE, RP_DETAIL, RP_LIST, + SAPL_GROUP_ADMINISTRATIVO, SAPL_GROUP_ANONYMOUS, + SAPL_GROUP_AUTOR, SAPL_GROUP_COMISSOES, + SAPL_GROUP_GERAL, SAPL_GROUP_LOGIN_SOCIAL, + SAPL_GROUP_MATERIA, SAPL_GROUP_NORMA, + SAPL_GROUP_PAINEL, SAPL_GROUP_PARLAMENTAR, + SAPL_GROUP_PROTOCOLO, SAPL_GROUP_SESSAO, + SAPL_GROUP_VOTANTE) +from sapl.sessao import models as sessao + __base__ = [RP_LIST, RP_DETAIL, RP_ADD, RP_CHANGE, RP_DELETE] __listdetailchange__ = [RP_LIST, RP_DETAIL, RP_CHANGE] @@ -159,6 +159,7 @@ rules_group_sessao = { (sessao.SessaoPlenaria, __base__), (sessao.SessaoPlenariaPresenca, __base__), (sessao.ExpedienteMateria, __base__), + (sessao.OcorrenciaSessao, __base__), (sessao.IntegranteMesa, __base__), (sessao.ExpedienteSessao, __base__), (sessao.Orador, __base__), diff --git a/sapl/sessao/forms.py b/sapl/sessao/forms.py index f7308f62e..a319e5447 100644 --- a/sapl/sessao/forms.py +++ b/sapl/sessao/forms.py @@ -22,7 +22,7 @@ from sapl.utils import (RANGE_DIAS_MES, RANGE_MESES, from .models import (Bancada, Bloco, ExpedienteMateria, Orador, OradorExpediente, OrdemDia, SessaoPlenaria, - SessaoPlenariaPresenca, TipoResultadoVotacao) + SessaoPlenariaPresenca, TipoResultadoVotacao, OcorrenciaSessao) def recupera_anos(): @@ -54,7 +54,8 @@ ORDENACAO_RESUMO = [('cont_mult', 'Conteúdo Multimídia'), ('mat_o_d', 'Matérias da Ordem do Dia'), ('mesa_d', 'Mesa Diretora'), ('oradores_exped', 'Oradores do Expediente'), - ('oradores_expli', 'Oradores das Explicações Pessoais')] + ('oradores_expli', 'Oradores das Explicações Pessoais'), + ('ocorrencia_sessao', 'Ocorrências da Sessão')] class SessaoPlenariaForm(ModelForm): @@ -411,6 +412,12 @@ class MesaForm(forms.Form): class ExpedienteForm(forms.Form): conteudo = forms.CharField(required=False, widget=forms.Textarea) +class OcorrenciaSessaoForm(ModelForm): + class Meta: + model = OcorrenciaSessao + fields = ['conteudo'] + + class VotacaoForm(forms.Form): votos_sim = forms.CharField(label='Sim') diff --git a/sapl/sessao/migrations/0024_ocorrenciasessao.py b/sapl/sessao/migrations/0024_ocorrenciasessao.py new file mode 100644 index 000000000..6c612363f --- /dev/null +++ b/sapl/sessao/migrations/0024_ocorrenciasessao.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2018-09-18 13:44 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('sessao', '0023_auto_20180914_1315'), + ] + + operations = [ + migrations.CreateModel( + name='OcorrenciaSessao', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('conteudo', models.TextField(blank=True, verbose_name='Ocorrências da Sessão Plenária')), + ('sessao_plenaria', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='sessao.SessaoPlenaria')), + ], + options={ + 'verbose_name_plural': 'Ocorrências da Sessão Plenaria', + 'verbose_name': 'Ocorrência da Sessão Plenaria', + }, + ), + ] diff --git a/sapl/sessao/migrations/0025_auto_20180919_1116.py b/sapl/sessao/migrations/0025_auto_20180919_1116.py new file mode 100644 index 000000000..fa4c0a435 --- /dev/null +++ b/sapl/sessao/migrations/0025_auto_20180919_1116.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.13 on 2018-09-19 14:16 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('sessao', '0024_ocorrenciasessao'), + ] + + operations = [ + migrations.AlterField( + model_name='ocorrenciasessao', + name='sessao_plenaria', + field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='sessao.SessaoPlenaria'), + ), + ] diff --git a/sapl/sessao/models.py b/sapl/sessao/models.py index 11047ed9e..7f8ea0882 100644 --- a/sapl/sessao/models.py +++ b/sapl/sessao/models.py @@ -301,6 +301,21 @@ class ExpedienteSessao(models.Model): # ExpedienteSessaoPlenaria return '%s - %s' % (self.tipo, self.sessao_plenaria) +@reversion.register() +class OcorrenciaSessao(models.Model): # OcorrenciaSessaoPlenaria + sessao_plenaria = models.OneToOneField(SessaoPlenaria, + on_delete=models.PROTECT) + conteudo = models.TextField( + blank=True, verbose_name=_('Ocorrências da Sessão Plenária')) + + class Meta: + verbose_name = _('Ocorrência da Sessão Plenaria') + verbose_name_plural = _('Ocorrências da Sessão Plenaria') + + def __str__(self): + return '%s - %s' % (self.sessao_plenaria, self.conteudo) + + @reversion.register() class IntegranteMesa(models.Model): # MesaSessaoPlenaria sessao_plenaria = models.ForeignKey(SessaoPlenaria, diff --git a/sapl/sessao/urls.py b/sapl/sessao/urls.py index 201623824..1e3e4ae43 100644 --- a/sapl/sessao/urls.py +++ b/sapl/sessao/urls.py @@ -3,7 +3,7 @@ from django.conf.urls import include, url from sapl.sessao.views import (AdicionarVariasMateriasExpediente, AdicionarVariasMateriasOrdemDia, BancadaCrud, BlocoCrud, CargoBancadaCrud, - ExpedienteMateriaCrud, ExpedienteView, + ExpedienteMateriaCrud, ExpedienteView, OcorrenciaSessaoView, MateriaOrdemDiaCrud, MesaView, OradorCrud, OradorExpedienteCrud, PainelView, PautaSessaoDetailView, PautaSessaoView, @@ -100,6 +100,8 @@ urlpatterns = [ # Subnav sessão url(r'^sessao/(?P\d+)/expediente$', ExpedienteView.as_view(), name='expediente'), + url(r'^sessao/(?P\d+)/ocorrencia_sessao$', + OcorrenciaSessaoView.as_view(), name='ocorrencia_sessao'), url(r'^sessao/(?P\d+)/presenca$', PresencaView.as_view(), name='presenca'), url(r'^sessao/(?P\d+)/painel$', @@ -110,7 +112,7 @@ urlpatterns = [ url(r'^sessao/(?P\d+)/resumo$', ResumoView.as_view(), name='resumo'), url(r'^sessao/(?P\d+)/resumo_ata$', - ResumoAtaView.as_view(), name='resumo_ata'), + ResumoAtaView.as_view(), name='resumo_ata'), url(r'^sessao/pesquisar-sessao$', PesquisarSessaoPlenariaView.as_view(), name='pesquisar_sessao'), url(r'^sessao/(?P\d+)/matordemdia/votnom/(?P\d+)/(?P\d+)$', diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index 32813f84a..d658ab787 100644 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -37,13 +37,13 @@ from sapl.sessao.forms import ExpedienteMateriaForm, OrdemDiaForm from sapl.utils import show_results_filter_set, remover_acentos from .forms import (AdicionarVariasMateriasFilterSet, BancadaForm, BlocoForm, - ExpedienteForm, ListMateriaForm, MesaForm, + ExpedienteForm, OcorrenciaSessaoForm, ListMateriaForm, MesaForm, OradorExpedienteForm, OradorForm, PautaSessaoFilterSet, PresencaForm, ResumoOrdenacaoForm, SessaoPlenariaFilterSet, SessaoPlenariaForm, VotacaoEditForm, VotacaoForm, VotacaoNominalForm) from .models import (Bancada, Bloco, CargoBancada, CargoMesa, - ExpedienteMateria, ExpedienteSessao, IntegranteMesa, + ExpedienteMateria, ExpedienteSessao, OcorrenciaSessao, IntegranteMesa, MateriaLegislativa, Orador, OradorExpediente, OrdemDia, PresencaOrdemDia, RegistroVotacao, ResumoOrdenacao, SessaoPlenaria, SessaoPlenariaPresenca, TipoExpediente, @@ -1175,7 +1175,8 @@ class ResumoOrdenacaoView(PermissionRequiredMixin, FormView): 'setimo': ordenacao.setimo, 'oitavo': ordenacao.oitavo, 'nono': ordenacao.nono, - 'decimo': ordenacao.decimo}) + 'decimo': ordenacao.decimo, + 'decimo_primeiro': ordenacao.decimo_primeiro}) return initial def form_valid(self, form): @@ -1191,6 +1192,7 @@ class ResumoOrdenacaoView(PermissionRequiredMixin, FormView): ordenacao.oitavo = form.cleaned_data['oitavo'] ordenacao.nono = form.cleaned_data['nono'] ordenacao.decimo = form.cleaned_data['decimo'] + ordenacao.decimo_primeiro = form.cleaned_data['decimo_primeiro'] ordenacao.save() @@ -1280,6 +1282,7 @@ class ResumoView(DetailView): ex = {'tipo': tipo, 'conteudo': conteudo} expedientes.append(ex) context.update({'expedientes': expedientes}) + # ===================================================================== # Matérias Expediente materias = ExpedienteMateria.objects.filter( @@ -1413,6 +1416,12 @@ class ResumoView(DetailView): oradores_explicacoes.append(oradores) context.update({'oradores_explicacoes': oradores_explicacoes}) + # ===================================================================== + # Ocorrẽncias da Sessão + ocorrencias_sessao = OcorrenciaSessao.objects.filter(sessao_plenaria_id=self.object.id) + + context.update({'ocorrencias_da_sessao': ocorrencias_sessao}) + # ===================================================================== # Indica a ordem com a qual o template será renderizado ordenacao = ResumoOrdenacao.objects.first() @@ -1426,7 +1435,8 @@ class ResumoView(DetailView): 'mat_o_d': 'materias_ordem_dia.html', 'mesa_d': 'mesa_diretora.html', 'oradores_exped': 'oradores_expediente.html', - 'oradores_expli': 'oradores_explicacoes.html' + 'oradores_expli': 'oradores_explicacoes.html', + 'ocorr_sessao': 'ocorrencias_da_sessao.html' } if ordenacao: @@ -1452,12 +1462,16 @@ class ResumoView(DetailView): 'setimo_ordenacao': dict_ord_template['oradores_exped'], 'oitavo_ordenacao': dict_ord_template['lista_p_o_d'], 'nono_ordenacao': dict_ord_template['mat_o_d'], - 'decimo_ordenacao': dict_ord_template['oradores_expli']}) + 'decimo_ordenacao': dict_ord_template['oradores_expli'], + 'decimo_primeiro_ordenacao': dict_ord_template['ocorr_sessao']}) return self.render_to_response(context) + + class ResumoAtaView(ResumoView): template_name = 'sessao/resumo_ata.html' + class ExpedienteView(FormMixin, DetailView): template_name = 'sessao/expediente.html' form_class = ExpedienteForm @@ -1537,6 +1551,49 @@ class ExpedienteView(FormMixin, DetailView): return reverse('sapl.sessao:expediente', kwargs={'pk': pk}) + +class OcorrenciaSessaoView(FormMixin, DetailView): + template_name = 'sessao/ocorrencia_sessao.html' + form_class = OcorrenciaSessaoForm + model = SessaoPlenaria + + def delete_form(self): + OcorrenciaSessao.objects.filter(sessao_plenaria=self.object.id).delete() + + msg = _('Registro deletado com sucesso') + messages.add_message(self.request, messages.SUCCESS, msg) + + def save_form(self,request): + conteudo = request.POST.get('conteudo') + + OcorrenciaSessao.objects.filter(sessao_plenaria=self.object.id).delete() + + ocorrencia = OcorrenciaSessao() + ocorrencia.sessao_plenaria_id = self.object.id + ocorrencia.conteudo = conteudo + ocorrencia.save() + + msg = _('Registro salvo com sucesso') + messages.add_message(self.request, messages.SUCCESS, msg) + + @method_decorator(permission_required('sessao.add_ocorrenciasessao')) + def post(self, request, *args, **kwargs): + self.object = self.get_object() + form = OcorrenciaSessaoForm(request.POST) + + if request.POST.get('delete'): + self.delete_form() + return self.form_valid(form) + + elif request.POST.get('save'): + self.save_form(request) + return self.form_valid(form) + + def get_success_url(self): + pk = self.kwargs['pk'] + return reverse('sapl.sessao:ocorrencia_sessao', kwargs={'pk': pk}) + + class VotacaoEditView(SessaoPermissionMixin): ''' @@ -1645,7 +1702,7 @@ class VotacaoView(SessaoPermissionMixin): def post(self, request, *args, **kwargs): self.object = self.get_object() form = VotacaoForm(request.POST) - context = self.get_context_data(object=self.object) + context = self.get_context_d(object=self.object) url = request.get_full_path() # ==================================================== diff --git a/sapl/templates/sessao/blocos_resumo/ocorrencias_da_sessao.html b/sapl/templates/sessao/blocos_resumo/ocorrencias_da_sessao.html new file mode 100644 index 000000000..c56a1bb69 --- /dev/null +++ b/sapl/templates/sessao/blocos_resumo/ocorrencias_da_sessao.html @@ -0,0 +1,6 @@ +
+ Ocorrências da Sessão +
+

{{object.ocorrenciasessao.conteudo|safe}}

+
+
\ No newline at end of file diff --git a/sapl/templates/sessao/ocorrencia_sessao.html b/sapl/templates/sessao/ocorrencia_sessao.html new file mode 100644 index 000000000..0daa921d8 --- /dev/null +++ b/sapl/templates/sessao/ocorrencia_sessao.html @@ -0,0 +1,32 @@ +{% extends "crud/detail.html" %} +{% load i18n %} +{% load crispy_forms_tags %} +{% load common_tags %} + +{% block actions %}{% endblock %} + +{% block title %}Ocorrências da Sessão ({{ object }}) {% endblock %} + +{% block detail_content %} + {% if perms|get_add_perm:view %} +
+ {% csrf_token %} +
+ +
+ + +
+ {% else %} + {{object.ocorrenciasessao.conteudo|safe}} + {% endif %} +{% endblock detail_content %} + + +{% block extra_js %} + {% if perms|get_add_perm:view %} + + {% endif %} +{% endblock %} \ No newline at end of file diff --git a/sapl/templates/sessao/resumo.html b/sapl/templates/sessao/resumo.html index b5831bdca..c7c2070ce 100644 --- a/sapl/templates/sessao/resumo.html +++ b/sapl/templates/sessao/resumo.html @@ -50,5 +50,7 @@ {% include 'sessao/blocos_resumo/'|add:decimo_ordenacao %}


+ {% include 'sessao/blocos_resumo/'|add:decimo_primeiro_ordenacao %} +


{% endblock detail_content %} diff --git a/sapl/templates/sessao/subnav.yaml b/sapl/templates/sessao/subnav.yaml index 236d57c4c..0a98b8a3b 100644 --- a/sapl/templates/sessao/subnav.yaml +++ b/sapl/templates/sessao/subnav.yaml @@ -10,6 +10,8 @@ url: presenca - title: {% trans 'Explicações Pessoais' %} url: orador_list + - title: {% trans 'Ocorrências da Sessão' %} + url: ocorrencia_sessao - title: {% trans 'Expedientes' %} children: From d71f14466d53efc1d408ff5f64d737ec129dfd0c Mon Sep 17 00:00:00 2001 From: AndreSouto Date: Wed, 3 Oct 2018 14:06:29 -0300 Subject: [PATCH 02/20] Fixes #2030 --- sapl/templates/sessao/blocos_ata/ocorrencias_da_sessao.html | 6 ++++++ sapl/templates/sessao/resumo_ata.html | 1 + 2 files changed, 7 insertions(+) create mode 100644 sapl/templates/sessao/blocos_ata/ocorrencias_da_sessao.html diff --git a/sapl/templates/sessao/blocos_ata/ocorrencias_da_sessao.html b/sapl/templates/sessao/blocos_ata/ocorrencias_da_sessao.html new file mode 100644 index 000000000..b1385e7c2 --- /dev/null +++ b/sapl/templates/sessao/blocos_ata/ocorrencias_da_sessao.html @@ -0,0 +1,6 @@ +
+

+ Ocorrências da Sessão: + {{object.ocorrenciasessao.conteudo|safe}} +

+
diff --git a/sapl/templates/sessao/resumo_ata.html b/sapl/templates/sessao/resumo_ata.html index a842b3f40..e1c1000a9 100644 --- a/sapl/templates/sessao/resumo_ata.html +++ b/sapl/templates/sessao/resumo_ata.html @@ -19,5 +19,6 @@ {% include 'sessao/blocos_ata/'|add:oitavo_ordenacao %} {% include 'sessao/blocos_ata/'|add:nono_ordenacao %} {% include 'sessao/blocos_ata/'|add:decimo_ordenacao %} + {% include 'sessao/blocos_ata/'|add:decimo_primeiro_ordenacao %} {% include 'sessao/blocos_ata/assinaturas.html' %} {% endblock detail_content %} \ No newline at end of file From ec9f61e4745bb534da7feea4b94c80e21e7c3341 Mon Sep 17 00:00:00 2001 From: AndreSouto Date: Thu, 4 Oct 2018 17:31:34 -0300 Subject: [PATCH 03/20] Fixes #2030 --- sapl/sessao/views.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index d658ab787..1b87c0a26 100644 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -1557,16 +1557,16 @@ class OcorrenciaSessaoView(FormMixin, DetailView): form_class = OcorrenciaSessaoForm model = SessaoPlenaria - def delete_form(self): - OcorrenciaSessao.objects.filter(sessao_plenaria=self.object.id).delete() + def delete(self): + OcorrenciaSessao.objects.filter(sessao_plenaria=self.object).delete() msg = _('Registro deletado com sucesso') messages.add_message(self.request, messages.SUCCESS, msg) - def save_form(self,request): - conteudo = request.POST.get('conteudo') + def save(self,form): + conteudo = form.cleaned_data['conteudo'] - OcorrenciaSessao.objects.filter(sessao_plenaria=self.object.id).delete() + OcorrenciaSessao.objects.filter(sessao_plenaria=self.object).delete() ocorrencia = OcorrenciaSessao() ocorrencia.sessao_plenaria_id = self.object.id @@ -1581,13 +1581,16 @@ class OcorrenciaSessaoView(FormMixin, DetailView): self.object = self.get_object() form = OcorrenciaSessaoForm(request.POST) + if not form.is_valid(): + return self.form_invalid(form) + if request.POST.get('delete'): - self.delete_form() - return self.form_valid(form) + self.delete() elif request.POST.get('save'): - self.save_form(request) - return self.form_valid(form) + self.save(form) + + return self.form_valid(form) def get_success_url(self): pk = self.kwargs['pk'] @@ -1702,7 +1705,7 @@ class VotacaoView(SessaoPermissionMixin): def post(self, request, *args, **kwargs): self.object = self.get_object() form = VotacaoForm(request.POST) - context = self.get_context_d(object=self.object) + context = self.get_context_data(object=self.object) url = request.get_full_path() # ==================================================== From d6cf7076338561dfb1b7a9f4df4e56c72a6162d9 Mon Sep 17 00:00:00 2001 From: AndreSouto Date: Fri, 5 Oct 2018 15:31:10 -0300 Subject: [PATCH 04/20] Fixes #2030 --- .coveragerc | 0 .github/ISSUE_TEMPLATE.md | 0 .github/PULL_REQUEST_TEMPLATE.md | 0 .gitignore | 0 .travis.yml | 0 .tx/config | 0 Dockerfile | 0 LICENSE.txt | 0 MANIFEST.in | 0 README.rst | 0 busy-wait.sh | 0 codeclimate.yml | 0 config/env-sample | 0 config/env_dockerfile | 0 config/nginx/nginx.conf | 0 config/nginx/sapl.conf | 0 conftest.py | 0 docker-compose.yml | 0 docker-env.sh | 0 docs/CODE_OF_CONDUCT.md | 0 docs/CONTRIBUTING.md | 0 docs/credits.txt | 0 docs/deploy.rst | 0 docs/howtogit.rst | 0 docs/implementacoes.rst | 0 docs/instalacao31.rst | 0 docs/logo_partidos.rst | 0 docs/logo_partidos/dem.png | Bin docs/logo_partidos/pdt.png | Bin docs/logo_partidos/pfl.png | Bin docs/logo_partidos/phs.png | Bin docs/logo_partidos/pl.png | Bin docs/logo_partidos/pmdb.png | Bin docs/logo_partidos/pmn.png | Bin docs/logo_partidos/pp.png | Bin docs/logo_partidos/pps.png | Bin docs/logo_partidos/prb.png | Bin docs/logo_partidos/prona.png | Bin docs/logo_partidos/prp.png | Bin docs/logo_partidos/prtb.png | Bin docs/logo_partidos/psb.png | Bin docs/logo_partidos/psc.png | Bin docs/logo_partidos/psdb.png | Bin docs/logo_partidos/psdc.png | Bin docs/logo_partidos/psl.png | Bin docs/logo_partidos/psol.png | Bin docs/logo_partidos/pt.png | Bin docs/logo_partidos/ptb.png | Bin docs/logo_partidos/ptc.png | Bin docs/logo_partidos/ptdob.png | Bin docs/logo_partidos/ptn.png | Bin docs/logo_partidos/pv.png | Bin docs/solr.rst | 0 docs/traducao.rst | 0 genkey.py | 0 media/.gitkeep | 0 pytest.ini | 0 requirements/dev-requirements.txt | 0 requirements/migration-requirements.txt | 0 requirements/requirements.txt | 0 requirements/test-requirements.txt | 0 sapl/.env_test | 0 sapl/__init__.py | 0 sapl/api/__init__.py | 0 sapl/api/admin.py | 0 sapl/api/apps.py | 0 sapl/api/forms.py | 0 sapl/api/pagination.py | 0 sapl/api/permissions.py | 0 sapl/api/serializers.py | 0 sapl/api/urls.py | 0 sapl/api/views.py | 0 sapl/audiencia/__init__.py | 0 sapl/audiencia/admin.py | 0 sapl/audiencia/apps.py | 0 sapl/audiencia/forms.py | 0 sapl/audiencia/migrations/0001_initial.py | 0 .../migrations/0002_auto_20180302_0926.py | 0 .../migrations/0003_auto_20180302_1111.py | 0 .../migrations/0004_auto_20180305_1006.py | 0 .../migrations/0005_auto_20180806_1236.py | 0 .../migrations/0006_auto_20180808_0856.py | 0 sapl/audiencia/migrations/__init__.py | 0 sapl/audiencia/models.py | 0 sapl/audiencia/tests/test_audiencia.py | 0 sapl/audiencia/urls.py | 0 sapl/audiencia/views.py | 0 sapl/base/__init__.py | 0 sapl/base/admin.py | 0 sapl/base/apps.py | 0 sapl/base/forms.py | 0 sapl/base/legacy.yaml | 0 sapl/base/migrations/0001_initial.py | 0 .../migrations/0002_auto_20170331_1900.py | 0 .../migrations/0003_auto_20170519_1106.py | 0 .../migrations/0004_auto_20170714_1838.py | 0 .../migrations/0005_auto_20170802_1428.py | 0 .../migrations/0006_auto_20170802_1908.py | 0 .../migrations/0007_auto_20170808_0850.py | 0 .../migrations/0008_auto_20170814_1409.py | 0 .../0009_appconfig_mostrar_brasao_painel.py | 0 .../0010_remove_appconfig_painel_aberto.py | 0 .../migrations/0011_auto_20171121_0958.py | 0 .../migrations/0012_auto_20171205_0917.py | 0 .../migrations/0013_auto_20180201_1338.py | 0 .../migrations/0014_auto_20180219_1402.py | 0 ...015_appconfig_receber_recibo_proposicao.py | 0 .../migrations/0016_auto_20180326_1840.py | 0 ...0017_appconfig_cronometro_consideracoes.py | 0 .../migrations/0018_auto_20180801_1652.py | 0 .../migrations/0019_auto_20180815_1025.py | 0 .../migrations/0020_auto_20180821_1421.py | 0 .../0021_appconfig_esfera_federacao.py | 0 sapl/base/migrations/__init__.py | 0 sapl/base/models.py | 0 sapl/base/search_indexes.py | 0 sapl/base/templatetags/__init__.py | 0 sapl/base/templatetags/base_tags.py | 0 sapl/base/templatetags/common_tags.py | 0 sapl/base/templatetags/menus.py | 0 sapl/base/tests/test_form.py | 0 sapl/base/tests/test_view_base.py | 0 sapl/base/tests/teststub_urls.py | 0 sapl/base/urls.py | 0 sapl/base/views.py | 0 sapl/comissoes/__init__.py | 0 sapl/comissoes/admin.py | 0 sapl/comissoes/apps.py | 0 sapl/comissoes/forms.py | 0 sapl/comissoes/legacy.yaml | 0 sapl/comissoes/migrations/0001_initial.py | 0 .../migrations/0002_auto_20170809_1236.py | 0 .../migrations/0003_auto_20171204_1658.py | 0 sapl/comissoes/migrations/0003_reuniao.py | 0 .../migrations/0004_auto_20180102_1652.py | 0 sapl/comissoes/migrations/0005_merge.py | 0 .../migrations/0006_auto_20180227_0842.py | 0 .../migrations/0007_auto_20180227_1025.py | 0 .../migrations/0008_auto_20180227_1111.py | 0 .../migrations/0009_auto_20180301_1011.py | 0 .../migrations/0010_auto_20180306_0918.py | 0 .../migrations/0010_auto_20180307_1645.py | 0 sapl/comissoes/migrations/0011_merge.py | 0 .../migrations/0012_documentoacessorio.py | 0 .../migrations/0013_auto_20180312_1533.py | 0 .../migrations/0014_auto_20180503_1055.py | 0 .../migrations/0015_auto_20180613_2023.py | 0 .../migrations/0016_auto_20180613_2121.py | 0 .../migrations/0017_auto_20180717_0827.py | 0 sapl/comissoes/migrations/__init__.py | 0 sapl/comissoes/models.py | 0 sapl/comissoes/tests/test_comissoes.py | 0 sapl/comissoes/urls.py | 0 sapl/comissoes/views.py | 0 sapl/compilacao/__init__.py | 0 sapl/compilacao/admin.py | 0 sapl/compilacao/apps.py | 0 sapl/compilacao/compilacao_data_tables.sql | 0 sapl/compilacao/forms.py | 0 sapl/compilacao/migrations/0001_initial.py | 0 .../migrations/0002_auto_20170825_1108.py | 0 .../migrations/0003_auto_20170825_1136.py | 0 .../migrations/0004_auto_20171031_1327.py | 0 .../migrations/0005_auto_20180319_1041.py | 0 .../migrations/0006_auto_20180321_1054.py | 0 .../migrations/0007_auto_20180911_1600.py | 0 sapl/compilacao/migrations/__init__.py | 0 sapl/compilacao/models.py | 0 sapl/compilacao/templatetags/__init__.py | 0 .../templatetags/compilacao_filters.py | 0 .../tests/test_tipo_texto_articulado_form.py | 0 sapl/compilacao/urls.py | 0 sapl/compilacao/utils.py | 0 sapl/compilacao/views.py | 0 sapl/context_processors.py | 0 sapl/crispy_layout_mixin.py | 0 sapl/crud/__init__.py | 0 sapl/crud/base.py | 0 sapl/crud/tests/__init__.py | 0 sapl/crud/tests/settings.py | 0 sapl/crud/tests/stub_app/layouts.yaml | 0 sapl/crud/tests/stub_app/models.py | 0 sapl/crud/tests/stub_app/templates/base.html | 0 sapl/crud/tests/stub_app/urls.py | 0 sapl/crud/tests/stub_app/views.py | 0 sapl/crud/tests/test_base.py | 0 sapl/crud/tests/test_masterdetail.py | 0 sapl/crud/urls.py | 0 sapl/decorators.py | 0 sapl/env-backup | 0 sapl/hashers.py | 0 .../Docs/verificação verbose names.txt | 0 sapl/legacy/__init__.py | 0 sapl/legacy/admin.py | 0 sapl/legacy/management/__init__.py | 0 sapl/legacy/management/commands/__init__.py | 0 .../management/commands/migracao_25_31.py | 0 .../commands/migracao_documentos.py | 0 .../management/commands/ressucitar_deps.py | 0 sapl/legacy/migracao.py | 0 sapl/legacy/migracao_dados.py | 0 sapl/legacy/migracao_documentos.py | 0 sapl/legacy/migracao_usuarios.py | 0 sapl/legacy/models.py | 0 sapl/legacy/router.py | 0 sapl/legacy/scripts/__init__.py | 0 sapl/legacy/scripts/exporta_zope/.gitignore | 0 sapl/legacy/scripts/exporta_zope/dump30.py | 0 .../scripts/exporta_zope/requirements.txt | 0 .../scripts/exporta_zope/variaveis_comuns.py | 0 sapl/legacy/scripts/ressucita_dependencias.py | 0 sapl/legacy/scripts/utils.py | 0 sapl/legacy/test_migracao_dados.py | 0 sapl/legacy/test_renames.py | 0 sapl/legacy/timezonesbrasil.py | 0 sapl/legacy/views.py | 0 sapl/legacy_migration_settings.py | 0 sapl/lexml/__init__.py | 0 sapl/lexml/admin.py | 0 sapl/lexml/apps.py | 0 sapl/lexml/legacy.yaml | 0 sapl/lexml/migrations/0001_initial.py | 0 sapl/lexml/migrations/__init__.py | 0 sapl/lexml/models.py | 0 sapl/lexml/urls.py | 0 sapl/lexml/views.py | 0 sapl/locale/en/LC_MESSAGES/django.po | 0 sapl/locale/es/LC_MESSAGES/django.po | 0 sapl/locale/pt_BR/LC_MESSAGES/django.po | 0 sapl/materia/__init__.py | 0 sapl/materia/admin.py | 0 sapl/materia/apps.py | 0 sapl/materia/email_utils.py | 0 .../pre_popula_status_tramitacao.json | 0 sapl/materia/forms.py | 0 sapl/materia/legacy.yaml | 0 sapl/materia/migrations/0001_initial.py | 0 .../migrations/0002_auto_20170330_1513.py | 0 .../migrations/0003_auto_20170403_1505.py | 0 .../migrations/0004_auto_20170504_1751.py | 0 .../migrations/0005_auto_20170522_1051.py | 0 .../migrations/0005_auto_20170522_1904.py | 0 sapl/materia/migrations/0006_merge.py | 0 .../migrations/0007_auto_20170620_1252.py | 0 .../migrations/0008_auto_20170622_1527.py | 0 .../migrations/0009_auto_20170712_0951.py | 0 .../migrations/0010_auto_20170808_0850.py | 0 .../migrations/0011_auto_20170808_1034.py | 0 .../migrations/0012_auto_20170815_1238.py | 0 .../migrations/0012_auto_20170829_1321.py | 0 .../0013_adiciona_status_tramitacao.py | 0 .../migrations/0013_auto_20170816_1136.py | 0 .../migrations/0014_auto_20170905_0818.py | 0 .../migrations/0015_auto_20170908_1024.py | 0 sapl/materia/migrations/0016_merge.py | 0 .../migrations/0017_auto_20170918_1257.py | 0 .../migrations/0018_auto_20171113_1339.py | 0 .../migrations/0019_auto_20171127_1500.py | 0 .../migrations/0020_auto_20171204_1658.py | 0 .../migrations/0021_auto_20180103_1343.py | 0 .../migrations/0022_auto_20180206_0908.py | 0 .../migrations/0023_proposicao_hash_code.py | 0 ...omaterialegislativa_sequencia_numeracao.py | 0 .../migrations/0025_auto_20180221_1649.py | 0 .../migrations/0026_auto_20180302_1411.py | 0 .../migrations/0027_auto_20180409_1443.py | 0 .../migrations/0028_auto_20180418_1629.py | 0 .../migrations/0029_auto_20180901_1628.py | 0 .../migrations/0030_tramitacao_timestamp.py | 0 sapl/materia/migrations/__init__.py | 0 sapl/materia/models.py | 0 sapl/materia/receivers.py | 0 sapl/materia/signals.py | 0 sapl/materia/tests/test_email_templates.py | 0 sapl/materia/tests/test_materia.py | 0 sapl/materia/tests/test_materia_form.py | 0 sapl/materia/tests/test_materia_urls.py | 0 sapl/materia/urls.py | 0 sapl/materia/views.py | 0 sapl/norma/__init__.py | 0 sapl/norma/admin.py | 0 sapl/norma/apps.py | 0 .../pre_popula_tipo_vinculo_norma.json | 0 sapl/norma/forms.py | 0 sapl/norma/legacy.yaml | 0 sapl/norma/migrations/0001_initial.py | 0 .../migrations/0002_auto_20170403_1505.py | 0 .../migrations/0003_auto_20170510_1549.py | 0 .../migrations/0004_auto_20170522_1051.py | 0 .../migrations/0004_auto_20170522_1115.py | 0 sapl/norma/migrations/0005_merge.py | 0 ...6_normajuridica_data_ultima_atualizacao.py | 0 .../migrations/0007_auto_20170904_1708.py | 0 ...normajuridica_popula_tipo_vinculo_norma.py | 0 .../migrations/0009_auto_20171113_1339.py | 0 .../migrations/0010_auto_20180103_1343.py | 0 .../migrations/0011_auto_20180220_1859.py | 0 .../migrations/0012_anexonormajuridica.py | 0 .../0013_anexonormajuridica_assunto_anexo.py | 0 sapl/norma/migrations/__init__.py | 0 sapl/norma/models.py | 0 sapl/norma/signals.py | 0 sapl/norma/tests/test_norma.py | 0 sapl/norma/urls.py | 0 sapl/norma/views.py | 0 sapl/painel/__init__.py | 0 sapl/painel/admin.py | 0 sapl/painel/apps.py | 0 sapl/painel/migrations/0001_initial.py | 0 .../migrations/0002_auto_20180523_1430.py | 0 sapl/painel/migrations/__init__.py | 0 sapl/painel/models.py | 0 sapl/painel/tests/tests.py | 0 sapl/painel/urls.py | 0 sapl/painel/views.py | 0 sapl/parlamentares/__init__.py | 0 sapl/parlamentares/admin.py | 0 sapl/parlamentares/apps.py | 0 .../fixtures/pre_popula_cargosmesa.json | 0 .../fixtures/pre_popula_partidos.json | 0 sapl/parlamentares/forms.py | 0 sapl/parlamentares/legacy.yaml | 0 sapl/parlamentares/migrations/0001_initial.py | 0 .../migrations/0002_auto_20170504_1751.py | 0 .../migrations/0003_auto_20170707_1656.py | 0 .../migrations/0004_auto_20170711_1305.py | 0 .../migrations/0005_auto_20170814_1615.py | 0 .../migrations/0006_auto_20170831_1400.py | 0 .../migrations/0007_adiciona_partidos.py | 0 .../migrations/0008_adiciona_cargos_mesa.py | 0 .../migrations/0009_auto_20170905_1617.py | 0 .../0010_corrige_data_inicio_mandato.py | 0 .../migrations/0011_auto_20171010_1433.py | 0 .../migrations/0012_auto_20171020_1045.py | 0 .../migrations/0013_auto_20180130_1425.py | 0 .../migrations/0014_auto_20180131_1014.py | 0 .../migrations/0015_auto_20180131_1629.py | 0 .../migrations/0016_auto_20180202_1331.py | 0 .../migrations/0017_auto_20180202_1528.py | 0 .../migrations/0018_auto_20180215_1015.py | 0 .../migrations/0019_auto_20180221_1155.py | 0 .../migrations/0020_fix_inicio_mandato.py | 0 .../migrations/0021_clear_thumbnails_cache.py | 0 .../migrations/0022_partido_observacao.py | 0 .../migrations/0023_auto_20180626_1524.py | 0 .../migrations/0024_auto_20180814_1237.py | 0 sapl/parlamentares/migrations/__init__.py | 0 sapl/parlamentares/models.py | 0 sapl/parlamentares/tests/test_mandato.py | 0 .../parlamentares/tests/test_parlamentares.py | 0 sapl/parlamentares/urls.py | 0 sapl/parlamentares/views.py | 0 sapl/protocoloadm/__init__.py | 0 sapl/protocoloadm/admin.py | 0 sapl/protocoloadm/apps.py | 0 sapl/protocoloadm/forms.py | 0 sapl/protocoloadm/legacy.yaml | 0 sapl/protocoloadm/migrations/0001_initial.py | 0 ...ocumentoadministrativo_numero_protocolo.py | 0 .../migrations/0003_auto_20180103_1343.py | 0 ..._documentoadministrativo_numero_externo.py | 0 .../migrations/0005_auto_20180824_1241.py | 0 .../0006_documentoadministrativo_restrito.py | 0 sapl/protocoloadm/migrations/__init__.py | 0 sapl/protocoloadm/models.py | 0 sapl/protocoloadm/tests/test_protocoloadm.py | 0 sapl/protocoloadm/urls.py | 0 sapl/protocoloadm/views.py | 0 sapl/redireciona_urls/__init__.py | 0 sapl/redireciona_urls/apps.py | 0 sapl/redireciona_urls/exceptions.py | 0 sapl/redireciona_urls/tests.py | 0 sapl/redireciona_urls/urls.py | 0 sapl/redireciona_urls/views.py | 0 sapl/relatorios/__init__.py | 0 sapl/relatorios/admin.py | 0 sapl/relatorios/apps.py | 0 sapl/relatorios/models.py | 0 .../templates/mensagem_emitir_proc.dtml | 0 .../pdf_detalhe_materia_preparar_pysc.py | 0 .../relatorios/templates/pdf_espelho_gerar.py | 0 .../templates/pdf_espelho_preparar_pysc.py | 0 .../templates/pdf_materia_preparar_pysc.py | 0 .../templates/pdf_ordem_dia_preparar_pysc.py | 0 .../templates/pdf_sessao_plenaria_gerar.py | 0 .../pdf_sessao_plenaria_preparar_pysc.py | 0 sapl/relatorios/tests.py | 0 sapl/relatorios/urls.py | 0 sapl/relatorios/views.py | 0 sapl/rules/__init__.py | 0 sapl/rules/apps.py | 0 sapl/rules/map_rules.py | 0 sapl/rules/models.py | 0 sapl/rules/tests/test_rules.py | 0 sapl/sessao/__init__.py | 0 sapl/sessao/admin.py | 0 sapl/sessao/apps.py | 0 sapl/sessao/forms.py | 0 sapl/sessao/legacy.yaml | 0 sapl/sessao/migrations/0001_initial.py | 0 .../0002_sessaoplenaria_interativa.py | 0 .../sessao/migrations/0003_resumoordenacao.py | 0 .../0004_votonominal_registro_votacao.py | 0 .../migrations/0005_auto_20170601_1246.py | 0 .../migrations/0006_auto_20170601_1257.py | 0 .../migrations/0007_auto_20170606_1238.py | 0 .../migrations/0008_auto_20170607_1220.py | 0 .../migrations/0009_auto_20170619_1441.py | 0 .../migrations/0010_auto_20170810_1033.py | 0 .../migrations/0010_auto_20170814_1804.py | 0 .../migrations/0011_auto_20170814_1409.py | 0 .../migrations/0011_auto_20170814_1849.py | 0 .../migrations/0012_auto_20170814_1615.py | 0 .../migrations/0012_auto_20170815_1244.py | 0 sapl/sessao/migrations/0013_merge.py | 0 .../migrations/0014_auto_20170905_1617.py | 0 .../0015_sessaoplenaria_painel_aberto.py | 0 .../migrations/0016_auto_20180131_1708.py | 0 .../migrations/0017_auto_20180316_0731.py | 0 .../migrations/0018_auto_20180327_1433.py | 0 .../migrations/0019_auto_20180404_1437.py | 0 .../migrations/0020_auto_20180416_1424.py | 0 .../migrations/0021_auto_20180417_1209.py | 0 .../migrations/0022_auto_20180618_1625.py | 0 .../migrations/0023_auto_20180914_1315.py | 0 .../migrations/0024_ocorrenciasessao.py | 0 .../migrations/0025_auto_20180919_1116.py | 0 sapl/sessao/migrations/__init__.py | 0 sapl/sessao/models.py | 0 sapl/sessao/serializers.py | 0 sapl/sessao/tests/test_sessao.py | 11 ++++++- sapl/sessao/tests/test_sessao_view.py | 27 +++++++++++++++++- sapl/sessao/urls.py | 0 sapl/sessao/views.py | 0 sapl/settings.py | 0 sapl/static/audio/ring.mp3 | Bin sapl/static/img/arrow.png | Bin sapl/static/img/authenticated.png | Bin sapl/static/img/avatar.png | Bin sapl/static/img/beta.png | Bin sapl/static/img/brasao_transp.gif | Bin sapl/static/img/down_arrow_select.jpg | Bin sapl/static/img/etiqueta.png | Bin sapl/static/img/favicon.ico | Bin sapl/static/img/file.png | Bin sapl/static/img/hand-note.png | Bin sapl/static/img/icon_comissoes.png | Bin sapl/static/img/icon_delete_white.png | Bin sapl/static/img/icon_materia_legislativa.png | Bin sapl/static/img/icon_mesa_diretora.png | Bin sapl/static/img/icon_normas_juridicas.png | Bin sapl/static/img/icon_parlamentares.png | Bin sapl/static/img/icon_pautas.png | Bin sapl/static/img/icon_plenarias.png | Bin sapl/static/img/icon_relatorios.png | Bin sapl/static/img/icon_save_white.png | Bin sapl/static/img/lexml.gif | Bin sapl/static/img/logo.png | Bin sapl/static/img/logo_cc.png | Bin sapl/static/img/logo_interlegis.png | Bin sapl/static/img/manual.png | Bin sapl/static/img/pdflogo.png | Bin sapl/static/img/perfil.png | Bin sapl/static/img/search-gray.png | Bin sapl/static/img/search.png | Bin sapl/static/img/user.png | Bin sapl/static/js/app.js | 0 sapl/static/js/compilacao.js | 0 sapl/static/js/compilacao_edit.js | 0 sapl/static/js/compilacao_notas.js | 0 sapl/static/js/compilacao_view.js | 0 sapl/static/js/jquery.runner.js | 0 sapl/static/styles/_header.scss | 0 sapl/static/styles/app.scss | 0 sapl/static/styles/compilacao.scss | 0 sapl/temp_suppress_crispy_form_warnings.py | 0 sapl/templates/ajuda.html | 0 sapl/templates/ajuda/acessando_alimenta.html | 0 sapl/templates/ajuda/acomp_materia.html | 0 sapl/templates/ajuda/anexos.html | 0 sapl/templates/ajuda/autor.html | 0 sapl/templates/ajuda/cadastro_comissoes.html | 0 sapl/templates/ajuda/cadastro_materia.html | 0 .../ajuda/cadastro_mesa_diretora.html | 0 .../ajuda/cadastro_parlamentares.html | 0 sapl/templates/ajuda/cargo_comissao.html | 0 sapl/templates/ajuda/cargo_mesa.html | 0 sapl/templates/ajuda/casa_legislativa.html | 0 sapl/templates/ajuda/coligacao.html | 0 sapl/templates/ajuda/consultas.html | 0 sapl/templates/ajuda/dependentes.html | 0 sapl/templates/ajuda/despacho_autoria.html | 0 sapl/templates/ajuda/envio_proposicao.html | 0 .../ajuda/filiacoes_partidarias.html | 0 sapl/templates/ajuda/fim_relatoria.html | 0 .../ajuda/gerenciamento_usuarios.html | 0 sapl/templates/ajuda/glossario.html | 0 sapl/templates/ajuda/impressos.html | 0 .../ajuda/legislacao_cita_matanexada.html | 0 sapl/templates/ajuda/legislatura.html | 0 sapl/templates/ajuda/lexml.html | 0 .../templates/ajuda/mandatos_parlamentar.html | 0 sapl/templates/ajuda/materia_anexada.html | 0 sapl/templates/ajuda/modulo_comissoes.html | 0 .../templates/ajuda/modulo_mesa_diretora.html | 0 .../ajuda/modulo_norma_juridica.html | 0 .../templates/ajuda/modulo_parlamentares.html | 0 .../ajuda/modulo_tramitacao_materias.html | 0 sapl/templates/ajuda/nivel_instrucao.html | 0 sapl/templates/ajuda/norma_juridica.html | 0 sapl/templates/ajuda/numeracao_docsacess.html | 0 sapl/templates/ajuda/ordem_dia.html | 0 sapl/templates/ajuda/orgao.html | 0 sapl/templates/ajuda/origem.html | 0 sapl/templates/ajuda/partidos.html | 0 .../ajuda/periodo_composicao_comissao.html | 0 sapl/templates/ajuda/proposicao.html | 0 sapl/templates/ajuda/proposicao_editor.html | 0 .../ajuda/proposicao_legislativa.html | 0 .../ajuda/protocolo_administrativo.html | 0 sapl/templates/ajuda/protocolo_anular.html | 0 sapl/templates/ajuda/protocolo_geral.html | 0 .../protocolo_gerar_etiqueta_processo.html | 0 .../protocolo_gerar_etiqueta_protocolo.html | 0 .../ajuda/protocolo_legislativo.html | 0 .../ajuda/recebimento_proposicao.html | 0 sapl/templates/ajuda/regime_tramitacao.html | 0 sapl/templates/ajuda/relatorios.html | 0 sapl/templates/ajuda/sessao_legislativa.html | 0 sapl/templates/ajuda/sessao_plenaria.html | 0 sapl/templates/ajuda/sessao_plenaria_ata.html | 0 .../ajuda/sessao_plenaria_expedientes.html | 0 ...sessao_plenaria_lista_presenca_sessao.html | 0 .../sessao_plenaria_materias_expediente.html | 0 .../sessao_plenaria_materias_ordem_dia.html | 0 .../templates/ajuda/sessao_plenaria_mesa.html | 0 .../ajuda/sessao_plenaria_oradores.html | 0 .../sessao_plenaria_oradores_expediente.html | 0 ...lenaria_oradores_explicacoes_pessoais.html | 0 .../sessao_plenaria_presenca_ordem_dia.html | 0 .../ajuda/sessao_plenaria_votacao.html | 0 sapl/templates/ajuda/status_tramitacao.html | 0 sapl/templates/ajuda/tipo_afastamento.html | 0 sapl/templates/ajuda/tipo_autor.html | 0 sapl/templates/ajuda/tipo_comissao.html | 0 sapl/templates/ajuda/tipo_dependente.html | 0 sapl/templates/ajuda/tipo_documento.html | 0 .../ajuda/tipo_materia_legislativa.html | 0 sapl/templates/ajuda/tipo_norma_juridica.html | 0 sapl/templates/ajuda/tipo_proposicao.html | 0 .../templates/ajuda/tipo_sessao_plenaria.html | 0 sapl/templates/ajuda/tipo_situa_militar.html | 0 sapl/templates/ajuda/tramitacao_lote.html | 0 .../templates/ajuda/tramitacao_relatoria.html | 0 sapl/templates/ajuda/troca_senha.html | 0 sapl/templates/ajuda/unidade_tramitacao.html | 0 sapl/templates/audiencia/layouts.yaml | 0 sapl/templates/auth/user_form.html | 0 sapl/templates/auth/user_list.html | 0 sapl/templates/base.html | 0 sapl/templates/base/RelatorioAtas_filter.html | 0 .../base/RelatorioAudiencia_filter.html | 0 ...elatorioDataFimPrazoTramitacao_filter.html | 0 .../RelatorioHistoricoTramitacao_filter.html | 0 ...latorioMateriasPorAnoAutorTipo_filter.html | 0 .../RelatorioMateriasPorAutor_filter.html | 0 ...RelatorioMateriasPorTramitacao_filter.html | 0 .../base/RelatorioPresencaSessao_filter.html | 0 .../base/RelatorioReuniao_filter.html | 0 sapl/templates/base/alterar_senha.html | 0 sapl/templates/base/autor_form.html | 0 sapl/templates/base/casalegislativa_list.html | 0 sapl/templates/base/layouts.yaml | 0 sapl/templates/base/login.html | 0 sapl/templates/base/nova_senha_form.html | 0 .../base/recupera_senha_email_enviado.html | 0 .../base/recuperar_senha_completo.html | 0 .../templates/base/recuperar_senha_email.html | 0 .../base/recuperar_senha_email_form.html | 0 sapl/templates/base/relatorios_list.html | 0 sapl/templates/base/tipoautor_list.html | 0 .../templates/comissoes/cadastro_reuniao.html | 0 .../comissoes/cadastro_reuniao_edit.html | 0 .../comissoes/comissao_parlamentar.html | 0 .../comissoes/comissao_parlamentar_edit.html | 0 sapl/templates/comissoes/composicao_list.html | 0 sapl/templates/comissoes/layouts.yaml | 0 sapl/templates/comissoes/materias.html | 0 .../comissoes/materias_em_tramitacao.html | 0 sapl/templates/comissoes/subnav.yaml | 0 .../compilacao/ajax_actions_dinamic_edit.html | 0 .../ajax_actions_registro_inclusao.html | 0 sapl/templates/compilacao/ajax_form.html | 0 .../compilacao/dispositivo_form.html | 0 .../dispositivo_form_alteracao.html | 0 .../dispositivo_form_definidor_vigencia.html | 0 .../dispositivo_form_edicao_basica.html | 0 .../compilacao/dispositivo_form_parents.html | 0 .../compilacao/dispositivo_form_search.html | 0 .../dispositivo_form_search_fragment.html | 0 .../compilacao/dispositivo_form_vigencia.html | 0 .../layout/bootstrap_btn_checkbox.html | 0 .../layout/dispositivo_checkbox.html | 0 .../compilacao/layout/dispositivo_radio.html | 0 sapl/templates/compilacao/layouts.yaml | 0 .../compilacao/publicacao_detail.html | 0 .../templates/compilacao/publicacao_list.html | 0 sapl/templates/compilacao/text_edit.html | 0 .../templates/compilacao/text_edit_bloco.html | 0 .../compilacao/text_edit_blocoalteracao.html | 0 sapl/templates/compilacao/text_list.html | 0 .../compilacao/text_list__print_version.html | 0 .../templates/compilacao/text_list_bloco.html | 0 .../compilacao/text_list_blocoalteracao.html | 0 .../compilacao/text_notificacoes.html | 0 .../compilacao/textoarticulado_detail.html | 0 .../compilacao/textoarticulado_list.html | 0 .../textoarticulado_menu_config.html | 0 .../tipotextoarticulado_detail.html | 0 .../compilacao/tipotextoarticulado_list.html | 0 sapl/templates/crud/ajax_form.html | 0 sapl/templates/crud/confirm_delete.html | 0 sapl/templates/crud/detail.html | 0 sapl/templates/crud/detail_detail.html | 0 sapl/templates/crud/form.html | 0 sapl/templates/crud/list.html | 0 sapl/templates/crud/list_tabaux.html | 0 sapl/templates/email/acompanhar.html | 0 sapl/templates/email/acompanhar.txt | 0 sapl/templates/email/confirma.html | 0 sapl/templates/email/test_tramitacao.html | 0 sapl/templates/email/tramitacao.html | 0 sapl/templates/email/tramitacao.txt | 0 .../floppyforms/image_thumbnail.html | 0 sapl/templates/index.html | 0 sapl/templates/lexml/layouts.yaml | 0 .../materia/acompanhamento_materia.html | 0 .../materia/adicionar_varias_autorias.html | 0 sapl/templates/materia/autoria_form.html | 0 sapl/templates/materia/autoria_list.html | 0 .../materia/autoria_multicreate_form.html | 0 .../materia/confirmar_proposicao.html | 0 .../materia/documentoacessorio_form.html | 0 sapl/templates/materia/em_lote/acessorio.html | 0 .../materia/em_lote/excluir_tramitacao.html | 0 .../materia/em_lote/subnav_em_lote.yaml | 0 .../templates/materia/em_lote/tramitacao.html | 0 .../materia/formulario_simplificado.html | 0 .../templates/materia/impressos/etiqueta.html | 0 .../materia/impressos/etiqueta_pdf.html | 0 sapl/templates/materia/impressos/ficha.html | 0 .../materia/impressos/ficha_pdf.html | 0 .../materia/impressos/ficha_seleciona.html | 0 .../materia/impressos/impressos.html | 0 sapl/templates/materia/impressos/norma.html | 0 .../materia/impressos/normas_pdf.html | 0 sapl/templates/materia/impressos/pdf.html | 0 sapl/templates/materia/layouts.yaml | 0 .../materia/materialegislativa_detail.html | 0 .../materia/materialegislativa_filter.html | 0 .../materia/materialegislativa_form.html | 0 .../materia/materialegislativa_list.html | 0 .../materia/prop_devolvidas_list.html | 0 .../materia/prop_pendentes_list.html | 0 .../materia/prop_recebidas_list.html | 0 .../materia/proposicao_confirm_delete.html | 0 .../materia/proposicao_confirm_return.html | 0 sapl/templates/materia/proposicao_detail.html | 0 sapl/templates/materia/proposicao_form.html | 0 sapl/templates/materia/recibo_proposicao.html | 0 sapl/templates/materia/relatoria_form.html | 0 .../materia/resumo_detail_materia.html | 0 sapl/templates/materia/subnav.yaml | 0 sapl/templates/materia/subnav_prop.yaml | 0 .../materia/tipoproposicao_form.html | 0 sapl/templates/materia/tramitacao_form.html | 0 sapl/templates/menu_tabelas_auxiliares.yaml | 0 sapl/templates/menus/menu.html | 0 sapl/templates/menus/nav.html | 0 sapl/templates/menus/subnav.html | 0 sapl/templates/navbar.yaml | 0 sapl/templates/norma/layouts.yaml | 0 .../templates/norma/normajuridica_detail.html | 0 .../templates/norma/normajuridica_filter.html | 0 sapl/templates/norma/normajuridica_form.html | 0 .../norma/normarelacionada_form.html | 0 sapl/templates/norma/subnav.yaml | 0 sapl/templates/paginacao.html | 0 sapl/templates/painel/index.html | 0 sapl/templates/painel/layouts.yaml | 0 sapl/templates/painel/mensagem.html | 0 sapl/templates/painel/parlamentares.html | 0 sapl/templates/painel/votacao.html | 0 sapl/templates/painel/voto_nominal.html | 0 .../parlamentares/composicaomesa_form.html | 0 sapl/templates/parlamentares/frente_form.html | 0 sapl/templates/parlamentares/layouts.yaml | 0 sapl/templates/parlamentares/materias.html | 0 .../parlamentar_perfil_publico.html | 0 .../parlamentares/parlamentares_list.html | 0 .../public_composicaomesa_form.html | 0 sapl/templates/parlamentares/subnav.yaml | 0 .../parlamentares/subnav_coligacao.yaml | 0 .../templates/parlamentares/votante_list.html | 0 .../protocoloadm/MateriaTemplate.html | 0 .../protocoloadm/anular_protocoloadm.html | 0 sapl/templates/protocoloadm/comprovante.html | 0 .../protocoloadm/criar_documento.html | 0 .../protocoloadm/detail_doc_adm.html | 0 .../protocoloadm/detail_doc_detail.html | 0 .../documento_acessorio_administrativo.html | 0 ...cumento_acessorio_administrativo_edit.html | 0 .../documentoadministrativo_filter.html | 0 .../documentoadministrativo_form.html | 0 sapl/templates/protocoloadm/layouts.yaml | 0 .../pesquisa_documento_detail.html | 0 .../protocoloadm/proposicao_receber.html | 0 .../protocoloadm/proposicao_view.html | 0 sapl/templates/protocoloadm/proposicoes.html | 0 .../protocoloadm/proposicoes_detail.html | 0 .../proposicoes_incorporadas.html | 0 .../proposicoes_naoincorporadas.html | 0 .../proposicoes_naorecebidas.html | 0 .../protocoloadm/protocolar_documento.html | 0 .../protocoloadm/protocolar_materia.html | 0 .../protocoloadm/protocolo_filter.html | 0 .../protocoloadm/protocolo_list.html | 0 .../protocoloadm/protocolo_mostrar.html | 0 .../protocoloadm/protocoloadm_detail.html | 0 sapl/templates/protocoloadm/subnav.yaml | 0 .../tramitacaoadministrativo_detail.html | 0 .../tramitacaoadministrativo_form.html | 0 sapl/templates/rest_framework_docs/base.html | 0 sapl/templates/rest_framework_docs/home.html | 0 .../materia/documentoacessorio_text.txt | 0 .../materia/materialegislativa_text.txt | 0 .../indexes/norma/normajuridica_text.txt | 0 sapl/templates/search/search.html | 0 .../adicionar_varias_materias_expediente.html | 0 .../adicionar_varias_materias_ordem.html | 0 .../sessao/blocos_ata/assinaturas.html | 0 .../blocos_ata/conteudo_multimidia.html | 0 .../sessao/blocos_ata/expedientes.html | 0 .../blocos_ata/identificacao_basica.html | 0 .../sessao/blocos_ata/lista_presenca.html | 0 .../blocos_ata/lista_presenca_ordem_dia.html | 0 .../blocos_ata/materias_expediente.html | 0 .../sessao/blocos_ata/materias_ordem_dia.html | 0 .../sessao/blocos_ata/mesa_diretora.html | 0 .../blocos_ata/ocorrencias_da_sessao.html | 0 .../blocos_ata/oradores_expediente.html | 0 .../blocos_ata/oradores_explicacoes.html | 0 .../blocos_resumo/conteudo_multimidia.html | 0 .../sessao/blocos_resumo/expedientes.html | 0 .../blocos_resumo/identificacao_basica.html | 0 .../sessao/blocos_resumo/lista_presenca.html | 0 .../lista_presenca_ordem_dia.html | 0 .../blocos_resumo/materias_expediente.html | 0 .../blocos_resumo/materias_ordem_dia.html | 0 .../sessao/blocos_resumo/mesa_diretora.html | 0 .../blocos_resumo/ocorrencias_da_sessao.html | 0 .../blocos_resumo/oradores_expediente.html | 0 .../blocos_resumo/oradores_explicacoes.html | 0 sapl/templates/sessao/expediente.html | 0 .../sessao/expedientemateria_form.html | 0 .../sessao/expedientemateria_list.html | 0 sapl/templates/sessao/layouts.yaml | 0 sapl/templates/sessao/mesa.html | 0 sapl/templates/sessao/ocorrencia_sessao.html | 0 sapl/templates/sessao/ordemdia_form.html | 0 sapl/templates/sessao/ordemdia_list.html | 0 sapl/templates/sessao/painel.html | 0 sapl/templates/sessao/pauta_inexistente.html | 0 .../templates/sessao/pauta_sessao_detail.html | 0 .../templates/sessao/pauta_sessao_filter.html | 0 sapl/templates/sessao/pauta_sessao_list.html | 0 sapl/templates/sessao/pauta_subnav.yaml | 0 sapl/templates/sessao/presenca.html | 0 sapl/templates/sessao/presenca_ordemdia.html | 0 sapl/templates/sessao/resumo.html | 0 sapl/templates/sessao/resumo_ata.html | 0 sapl/templates/sessao/resumo_ordenacao.html | 0 .../sessao/sessaoplenaria_filter.html | 0 .../templates/sessao/sessaoplenaria_form.html | 0 .../templates/sessao/sessaoplenaria_list.html | 0 sapl/templates/sessao/subnav.yaml | 0 sapl/templates/sessao/votacao/nominal.html | 0 .../sessao/votacao/nominal_detail.html | 0 .../sessao/votacao/nominal_edit.html | 0 .../sessao/votacao/nominal_transparencia.html | 0 .../votacao/simbolica_transparencia.html | 0 sapl/templates/sessao/votacao/votacao.html | 0 .../sessao/votacao/votacao_edit.html | 0 sapl/templates/sistema.html | 0 sapl/test_crispy_layout_mixin.py | 0 sapl/test_general.py | 0 sapl/test_urls.py | 0 sapl/test_utils.py | 0 sapl/urls.py | 0 sapl/utils.py | 0 sapl/wsgi.py | 0 scripts/anonimizador/anon.py | 0 scripts/anonimizador/nomes.txt | 0 scripts/anonimizador/paragrafos.txt | 0 ...onvert_null_to_empty_in_all_char_fields.py | 0 scripts/fk_protocoloadm_docadm.py | 0 scripts/hooks/pre-commit | 0 scripts/id_numero_legislatura.py | 0 scripts/legacy_db_checks.sql | 0 scripts/lista_permissions_in_decorators.py | 0 scripts/lista_urls.py | 0 scripts/redbaron.py | 0 scripts/set_inicio_mandato.py | 0 scripts/voto_parlamentar.sql | 0 setup.py | 0 test_hashers.py | 0 816 files changed, 36 insertions(+), 2 deletions(-) mode change 100644 => 100755 .coveragerc mode change 100644 => 100755 .github/ISSUE_TEMPLATE.md mode change 100644 => 100755 .github/PULL_REQUEST_TEMPLATE.md mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .travis.yml mode change 100644 => 100755 .tx/config mode change 100644 => 100755 Dockerfile mode change 100644 => 100755 LICENSE.txt mode change 100644 => 100755 MANIFEST.in mode change 100644 => 100755 README.rst mode change 100644 => 100755 busy-wait.sh mode change 100644 => 100755 codeclimate.yml mode change 100644 => 100755 config/env-sample mode change 100644 => 100755 config/env_dockerfile mode change 100644 => 100755 config/nginx/nginx.conf mode change 100644 => 100755 config/nginx/sapl.conf mode change 100644 => 100755 conftest.py mode change 100644 => 100755 docker-compose.yml mode change 100644 => 100755 docker-env.sh mode change 100644 => 100755 docs/CODE_OF_CONDUCT.md mode change 100644 => 100755 docs/CONTRIBUTING.md mode change 100644 => 100755 docs/credits.txt mode change 100644 => 100755 docs/deploy.rst mode change 100644 => 100755 docs/howtogit.rst mode change 100644 => 100755 docs/implementacoes.rst mode change 100644 => 100755 docs/instalacao31.rst mode change 100644 => 100755 docs/logo_partidos.rst mode change 100644 => 100755 docs/logo_partidos/dem.png mode change 100644 => 100755 docs/logo_partidos/pdt.png mode change 100644 => 100755 docs/logo_partidos/pfl.png mode change 100644 => 100755 docs/logo_partidos/phs.png mode change 100644 => 100755 docs/logo_partidos/pl.png mode change 100644 => 100755 docs/logo_partidos/pmdb.png mode change 100644 => 100755 docs/logo_partidos/pmn.png mode change 100644 => 100755 docs/logo_partidos/pp.png mode change 100644 => 100755 docs/logo_partidos/pps.png mode change 100644 => 100755 docs/logo_partidos/prb.png mode change 100644 => 100755 docs/logo_partidos/prona.png mode change 100644 => 100755 docs/logo_partidos/prp.png mode change 100644 => 100755 docs/logo_partidos/prtb.png mode change 100644 => 100755 docs/logo_partidos/psb.png mode change 100644 => 100755 docs/logo_partidos/psc.png mode change 100644 => 100755 docs/logo_partidos/psdb.png mode change 100644 => 100755 docs/logo_partidos/psdc.png mode change 100644 => 100755 docs/logo_partidos/psl.png mode change 100644 => 100755 docs/logo_partidos/psol.png mode change 100644 => 100755 docs/logo_partidos/pt.png mode change 100644 => 100755 docs/logo_partidos/ptb.png mode change 100644 => 100755 docs/logo_partidos/ptc.png mode change 100644 => 100755 docs/logo_partidos/ptdob.png mode change 100644 => 100755 docs/logo_partidos/ptn.png mode change 100644 => 100755 docs/logo_partidos/pv.png mode change 100644 => 100755 docs/solr.rst mode change 100644 => 100755 docs/traducao.rst mode change 100644 => 100755 genkey.py mode change 100644 => 100755 media/.gitkeep mode change 100644 => 100755 pytest.ini mode change 100644 => 100755 requirements/dev-requirements.txt mode change 100644 => 100755 requirements/migration-requirements.txt mode change 100644 => 100755 requirements/requirements.txt mode change 100644 => 100755 requirements/test-requirements.txt mode change 100644 => 100755 sapl/.env_test mode change 100644 => 100755 sapl/__init__.py mode change 100644 => 100755 sapl/api/__init__.py mode change 100644 => 100755 sapl/api/admin.py mode change 100644 => 100755 sapl/api/apps.py mode change 100644 => 100755 sapl/api/forms.py mode change 100644 => 100755 sapl/api/pagination.py mode change 100644 => 100755 sapl/api/permissions.py mode change 100644 => 100755 sapl/api/serializers.py mode change 100644 => 100755 sapl/api/urls.py mode change 100644 => 100755 sapl/api/views.py mode change 100644 => 100755 sapl/audiencia/__init__.py mode change 100644 => 100755 sapl/audiencia/admin.py mode change 100644 => 100755 sapl/audiencia/apps.py mode change 100644 => 100755 sapl/audiencia/forms.py mode change 100644 => 100755 sapl/audiencia/migrations/0001_initial.py mode change 100644 => 100755 sapl/audiencia/migrations/0002_auto_20180302_0926.py mode change 100644 => 100755 sapl/audiencia/migrations/0003_auto_20180302_1111.py mode change 100644 => 100755 sapl/audiencia/migrations/0004_auto_20180305_1006.py mode change 100644 => 100755 sapl/audiencia/migrations/0005_auto_20180806_1236.py mode change 100644 => 100755 sapl/audiencia/migrations/0006_auto_20180808_0856.py mode change 100644 => 100755 sapl/audiencia/migrations/__init__.py mode change 100644 => 100755 sapl/audiencia/models.py mode change 100644 => 100755 sapl/audiencia/tests/test_audiencia.py mode change 100644 => 100755 sapl/audiencia/urls.py mode change 100644 => 100755 sapl/audiencia/views.py mode change 100644 => 100755 sapl/base/__init__.py mode change 100644 => 100755 sapl/base/admin.py mode change 100644 => 100755 sapl/base/apps.py mode change 100644 => 100755 sapl/base/forms.py mode change 100644 => 100755 sapl/base/legacy.yaml mode change 100644 => 100755 sapl/base/migrations/0001_initial.py mode change 100644 => 100755 sapl/base/migrations/0002_auto_20170331_1900.py mode change 100644 => 100755 sapl/base/migrations/0003_auto_20170519_1106.py mode change 100644 => 100755 sapl/base/migrations/0004_auto_20170714_1838.py mode change 100644 => 100755 sapl/base/migrations/0005_auto_20170802_1428.py mode change 100644 => 100755 sapl/base/migrations/0006_auto_20170802_1908.py mode change 100644 => 100755 sapl/base/migrations/0007_auto_20170808_0850.py mode change 100644 => 100755 sapl/base/migrations/0008_auto_20170814_1409.py mode change 100644 => 100755 sapl/base/migrations/0009_appconfig_mostrar_brasao_painel.py mode change 100644 => 100755 sapl/base/migrations/0010_remove_appconfig_painel_aberto.py mode change 100644 => 100755 sapl/base/migrations/0011_auto_20171121_0958.py mode change 100644 => 100755 sapl/base/migrations/0012_auto_20171205_0917.py mode change 100644 => 100755 sapl/base/migrations/0013_auto_20180201_1338.py mode change 100644 => 100755 sapl/base/migrations/0014_auto_20180219_1402.py mode change 100644 => 100755 sapl/base/migrations/0015_appconfig_receber_recibo_proposicao.py mode change 100644 => 100755 sapl/base/migrations/0016_auto_20180326_1840.py mode change 100644 => 100755 sapl/base/migrations/0017_appconfig_cronometro_consideracoes.py mode change 100644 => 100755 sapl/base/migrations/0018_auto_20180801_1652.py mode change 100644 => 100755 sapl/base/migrations/0019_auto_20180815_1025.py mode change 100644 => 100755 sapl/base/migrations/0020_auto_20180821_1421.py mode change 100644 => 100755 sapl/base/migrations/0021_appconfig_esfera_federacao.py mode change 100644 => 100755 sapl/base/migrations/__init__.py mode change 100644 => 100755 sapl/base/models.py mode change 100644 => 100755 sapl/base/search_indexes.py mode change 100644 => 100755 sapl/base/templatetags/__init__.py mode change 100644 => 100755 sapl/base/templatetags/base_tags.py mode change 100644 => 100755 sapl/base/templatetags/common_tags.py mode change 100644 => 100755 sapl/base/templatetags/menus.py mode change 100644 => 100755 sapl/base/tests/test_form.py mode change 100644 => 100755 sapl/base/tests/test_view_base.py mode change 100644 => 100755 sapl/base/tests/teststub_urls.py mode change 100644 => 100755 sapl/base/urls.py mode change 100644 => 100755 sapl/base/views.py mode change 100644 => 100755 sapl/comissoes/__init__.py mode change 100644 => 100755 sapl/comissoes/admin.py mode change 100644 => 100755 sapl/comissoes/apps.py mode change 100644 => 100755 sapl/comissoes/forms.py mode change 100644 => 100755 sapl/comissoes/legacy.yaml mode change 100644 => 100755 sapl/comissoes/migrations/0001_initial.py mode change 100644 => 100755 sapl/comissoes/migrations/0002_auto_20170809_1236.py mode change 100644 => 100755 sapl/comissoes/migrations/0003_auto_20171204_1658.py mode change 100644 => 100755 sapl/comissoes/migrations/0003_reuniao.py mode change 100644 => 100755 sapl/comissoes/migrations/0004_auto_20180102_1652.py mode change 100644 => 100755 sapl/comissoes/migrations/0005_merge.py mode change 100644 => 100755 sapl/comissoes/migrations/0006_auto_20180227_0842.py mode change 100644 => 100755 sapl/comissoes/migrations/0007_auto_20180227_1025.py mode change 100644 => 100755 sapl/comissoes/migrations/0008_auto_20180227_1111.py mode change 100644 => 100755 sapl/comissoes/migrations/0009_auto_20180301_1011.py mode change 100644 => 100755 sapl/comissoes/migrations/0010_auto_20180306_0918.py mode change 100644 => 100755 sapl/comissoes/migrations/0010_auto_20180307_1645.py mode change 100644 => 100755 sapl/comissoes/migrations/0011_merge.py mode change 100644 => 100755 sapl/comissoes/migrations/0012_documentoacessorio.py mode change 100644 => 100755 sapl/comissoes/migrations/0013_auto_20180312_1533.py mode change 100644 => 100755 sapl/comissoes/migrations/0014_auto_20180503_1055.py mode change 100644 => 100755 sapl/comissoes/migrations/0015_auto_20180613_2023.py mode change 100644 => 100755 sapl/comissoes/migrations/0016_auto_20180613_2121.py mode change 100644 => 100755 sapl/comissoes/migrations/0017_auto_20180717_0827.py mode change 100644 => 100755 sapl/comissoes/migrations/__init__.py mode change 100644 => 100755 sapl/comissoes/models.py mode change 100644 => 100755 sapl/comissoes/tests/test_comissoes.py mode change 100644 => 100755 sapl/comissoes/urls.py mode change 100644 => 100755 sapl/comissoes/views.py mode change 100644 => 100755 sapl/compilacao/__init__.py mode change 100644 => 100755 sapl/compilacao/admin.py mode change 100644 => 100755 sapl/compilacao/apps.py mode change 100644 => 100755 sapl/compilacao/compilacao_data_tables.sql mode change 100644 => 100755 sapl/compilacao/forms.py mode change 100644 => 100755 sapl/compilacao/migrations/0001_initial.py mode change 100644 => 100755 sapl/compilacao/migrations/0002_auto_20170825_1108.py mode change 100644 => 100755 sapl/compilacao/migrations/0003_auto_20170825_1136.py mode change 100644 => 100755 sapl/compilacao/migrations/0004_auto_20171031_1327.py mode change 100644 => 100755 sapl/compilacao/migrations/0005_auto_20180319_1041.py mode change 100644 => 100755 sapl/compilacao/migrations/0006_auto_20180321_1054.py mode change 100644 => 100755 sapl/compilacao/migrations/0007_auto_20180911_1600.py mode change 100644 => 100755 sapl/compilacao/migrations/__init__.py mode change 100644 => 100755 sapl/compilacao/models.py mode change 100644 => 100755 sapl/compilacao/templatetags/__init__.py mode change 100644 => 100755 sapl/compilacao/templatetags/compilacao_filters.py mode change 100644 => 100755 sapl/compilacao/tests/test_tipo_texto_articulado_form.py mode change 100644 => 100755 sapl/compilacao/urls.py mode change 100644 => 100755 sapl/compilacao/utils.py mode change 100644 => 100755 sapl/compilacao/views.py mode change 100644 => 100755 sapl/context_processors.py mode change 100644 => 100755 sapl/crispy_layout_mixin.py mode change 100644 => 100755 sapl/crud/__init__.py mode change 100644 => 100755 sapl/crud/base.py mode change 100644 => 100755 sapl/crud/tests/__init__.py mode change 100644 => 100755 sapl/crud/tests/settings.py mode change 100644 => 100755 sapl/crud/tests/stub_app/layouts.yaml mode change 100644 => 100755 sapl/crud/tests/stub_app/models.py mode change 100644 => 100755 sapl/crud/tests/stub_app/templates/base.html mode change 100644 => 100755 sapl/crud/tests/stub_app/urls.py mode change 100644 => 100755 sapl/crud/tests/stub_app/views.py mode change 100644 => 100755 sapl/crud/tests/test_base.py mode change 100644 => 100755 sapl/crud/tests/test_masterdetail.py mode change 100644 => 100755 sapl/crud/urls.py mode change 100644 => 100755 sapl/decorators.py mode change 100644 => 100755 sapl/env-backup mode change 100644 => 100755 sapl/hashers.py mode change 100644 => 100755 sapl/legacy/Docs/verificação verbose names.txt mode change 100644 => 100755 sapl/legacy/__init__.py mode change 100644 => 100755 sapl/legacy/admin.py mode change 100644 => 100755 sapl/legacy/management/__init__.py mode change 100644 => 100755 sapl/legacy/management/commands/__init__.py mode change 100644 => 100755 sapl/legacy/management/commands/migracao_25_31.py mode change 100644 => 100755 sapl/legacy/management/commands/migracao_documentos.py mode change 100644 => 100755 sapl/legacy/management/commands/ressucitar_deps.py mode change 100644 => 100755 sapl/legacy/migracao.py mode change 100644 => 100755 sapl/legacy/migracao_dados.py mode change 100644 => 100755 sapl/legacy/migracao_documentos.py mode change 100644 => 100755 sapl/legacy/migracao_usuarios.py mode change 100644 => 100755 sapl/legacy/models.py mode change 100644 => 100755 sapl/legacy/router.py mode change 100644 => 100755 sapl/legacy/scripts/__init__.py mode change 100644 => 100755 sapl/legacy/scripts/exporta_zope/.gitignore mode change 100644 => 100755 sapl/legacy/scripts/exporta_zope/dump30.py mode change 100644 => 100755 sapl/legacy/scripts/exporta_zope/requirements.txt mode change 100644 => 100755 sapl/legacy/scripts/exporta_zope/variaveis_comuns.py mode change 100644 => 100755 sapl/legacy/scripts/ressucita_dependencias.py mode change 100644 => 100755 sapl/legacy/scripts/utils.py mode change 100644 => 100755 sapl/legacy/test_migracao_dados.py mode change 100644 => 100755 sapl/legacy/test_renames.py mode change 100644 => 100755 sapl/legacy/timezonesbrasil.py mode change 100644 => 100755 sapl/legacy/views.py mode change 100644 => 100755 sapl/legacy_migration_settings.py mode change 100644 => 100755 sapl/lexml/__init__.py mode change 100644 => 100755 sapl/lexml/admin.py mode change 100644 => 100755 sapl/lexml/apps.py mode change 100644 => 100755 sapl/lexml/legacy.yaml mode change 100644 => 100755 sapl/lexml/migrations/0001_initial.py mode change 100644 => 100755 sapl/lexml/migrations/__init__.py mode change 100644 => 100755 sapl/lexml/models.py mode change 100644 => 100755 sapl/lexml/urls.py mode change 100644 => 100755 sapl/lexml/views.py mode change 100644 => 100755 sapl/locale/en/LC_MESSAGES/django.po mode change 100644 => 100755 sapl/locale/es/LC_MESSAGES/django.po mode change 100644 => 100755 sapl/locale/pt_BR/LC_MESSAGES/django.po mode change 100644 => 100755 sapl/materia/__init__.py mode change 100644 => 100755 sapl/materia/admin.py mode change 100644 => 100755 sapl/materia/apps.py mode change 100644 => 100755 sapl/materia/email_utils.py mode change 100644 => 100755 sapl/materia/fixtures/pre_popula_status_tramitacao.json mode change 100644 => 100755 sapl/materia/forms.py mode change 100644 => 100755 sapl/materia/legacy.yaml mode change 100644 => 100755 sapl/materia/migrations/0001_initial.py mode change 100644 => 100755 sapl/materia/migrations/0002_auto_20170330_1513.py mode change 100644 => 100755 sapl/materia/migrations/0003_auto_20170403_1505.py mode change 100644 => 100755 sapl/materia/migrations/0004_auto_20170504_1751.py mode change 100644 => 100755 sapl/materia/migrations/0005_auto_20170522_1051.py mode change 100644 => 100755 sapl/materia/migrations/0005_auto_20170522_1904.py mode change 100644 => 100755 sapl/materia/migrations/0006_merge.py mode change 100644 => 100755 sapl/materia/migrations/0007_auto_20170620_1252.py mode change 100644 => 100755 sapl/materia/migrations/0008_auto_20170622_1527.py mode change 100644 => 100755 sapl/materia/migrations/0009_auto_20170712_0951.py mode change 100644 => 100755 sapl/materia/migrations/0010_auto_20170808_0850.py mode change 100644 => 100755 sapl/materia/migrations/0011_auto_20170808_1034.py mode change 100644 => 100755 sapl/materia/migrations/0012_auto_20170815_1238.py mode change 100644 => 100755 sapl/materia/migrations/0012_auto_20170829_1321.py mode change 100644 => 100755 sapl/materia/migrations/0013_adiciona_status_tramitacao.py mode change 100644 => 100755 sapl/materia/migrations/0013_auto_20170816_1136.py mode change 100644 => 100755 sapl/materia/migrations/0014_auto_20170905_0818.py mode change 100644 => 100755 sapl/materia/migrations/0015_auto_20170908_1024.py mode change 100644 => 100755 sapl/materia/migrations/0016_merge.py mode change 100644 => 100755 sapl/materia/migrations/0017_auto_20170918_1257.py mode change 100644 => 100755 sapl/materia/migrations/0018_auto_20171113_1339.py mode change 100644 => 100755 sapl/materia/migrations/0019_auto_20171127_1500.py mode change 100644 => 100755 sapl/materia/migrations/0020_auto_20171204_1658.py mode change 100644 => 100755 sapl/materia/migrations/0021_auto_20180103_1343.py mode change 100644 => 100755 sapl/materia/migrations/0022_auto_20180206_0908.py mode change 100644 => 100755 sapl/materia/migrations/0023_proposicao_hash_code.py mode change 100644 => 100755 sapl/materia/migrations/0024_tipomaterialegislativa_sequencia_numeracao.py mode change 100644 => 100755 sapl/materia/migrations/0025_auto_20180221_1649.py mode change 100644 => 100755 sapl/materia/migrations/0026_auto_20180302_1411.py mode change 100644 => 100755 sapl/materia/migrations/0027_auto_20180409_1443.py mode change 100644 => 100755 sapl/materia/migrations/0028_auto_20180418_1629.py mode change 100644 => 100755 sapl/materia/migrations/0029_auto_20180901_1628.py mode change 100644 => 100755 sapl/materia/migrations/0030_tramitacao_timestamp.py mode change 100644 => 100755 sapl/materia/migrations/__init__.py mode change 100644 => 100755 sapl/materia/models.py mode change 100644 => 100755 sapl/materia/receivers.py mode change 100644 => 100755 sapl/materia/signals.py mode change 100644 => 100755 sapl/materia/tests/test_email_templates.py mode change 100644 => 100755 sapl/materia/tests/test_materia.py mode change 100644 => 100755 sapl/materia/tests/test_materia_form.py mode change 100644 => 100755 sapl/materia/tests/test_materia_urls.py mode change 100644 => 100755 sapl/materia/urls.py mode change 100644 => 100755 sapl/materia/views.py mode change 100644 => 100755 sapl/norma/__init__.py mode change 100644 => 100755 sapl/norma/admin.py mode change 100644 => 100755 sapl/norma/apps.py mode change 100644 => 100755 sapl/norma/fixtures/pre_popula_tipo_vinculo_norma.json mode change 100644 => 100755 sapl/norma/forms.py mode change 100644 => 100755 sapl/norma/legacy.yaml mode change 100644 => 100755 sapl/norma/migrations/0001_initial.py mode change 100644 => 100755 sapl/norma/migrations/0002_auto_20170403_1505.py mode change 100644 => 100755 sapl/norma/migrations/0003_auto_20170510_1549.py mode change 100644 => 100755 sapl/norma/migrations/0004_auto_20170522_1051.py mode change 100644 => 100755 sapl/norma/migrations/0004_auto_20170522_1115.py mode change 100644 => 100755 sapl/norma/migrations/0005_merge.py mode change 100644 => 100755 sapl/norma/migrations/0006_normajuridica_data_ultima_atualizacao.py mode change 100644 => 100755 sapl/norma/migrations/0007_auto_20170904_1708.py mode change 100644 => 100755 sapl/norma/migrations/0008_normajuridica_popula_tipo_vinculo_norma.py mode change 100644 => 100755 sapl/norma/migrations/0009_auto_20171113_1339.py mode change 100644 => 100755 sapl/norma/migrations/0010_auto_20180103_1343.py mode change 100644 => 100755 sapl/norma/migrations/0011_auto_20180220_1859.py mode change 100644 => 100755 sapl/norma/migrations/0012_anexonormajuridica.py mode change 100644 => 100755 sapl/norma/migrations/0013_anexonormajuridica_assunto_anexo.py mode change 100644 => 100755 sapl/norma/migrations/__init__.py mode change 100644 => 100755 sapl/norma/models.py mode change 100644 => 100755 sapl/norma/signals.py mode change 100644 => 100755 sapl/norma/tests/test_norma.py mode change 100644 => 100755 sapl/norma/urls.py mode change 100644 => 100755 sapl/norma/views.py mode change 100644 => 100755 sapl/painel/__init__.py mode change 100644 => 100755 sapl/painel/admin.py mode change 100644 => 100755 sapl/painel/apps.py mode change 100644 => 100755 sapl/painel/migrations/0001_initial.py mode change 100644 => 100755 sapl/painel/migrations/0002_auto_20180523_1430.py mode change 100644 => 100755 sapl/painel/migrations/__init__.py mode change 100644 => 100755 sapl/painel/models.py mode change 100644 => 100755 sapl/painel/tests/tests.py mode change 100644 => 100755 sapl/painel/urls.py mode change 100644 => 100755 sapl/painel/views.py mode change 100644 => 100755 sapl/parlamentares/__init__.py mode change 100644 => 100755 sapl/parlamentares/admin.py mode change 100644 => 100755 sapl/parlamentares/apps.py mode change 100644 => 100755 sapl/parlamentares/fixtures/pre_popula_cargosmesa.json mode change 100644 => 100755 sapl/parlamentares/fixtures/pre_popula_partidos.json mode change 100644 => 100755 sapl/parlamentares/forms.py mode change 100644 => 100755 sapl/parlamentares/legacy.yaml mode change 100644 => 100755 sapl/parlamentares/migrations/0001_initial.py mode change 100644 => 100755 sapl/parlamentares/migrations/0002_auto_20170504_1751.py mode change 100644 => 100755 sapl/parlamentares/migrations/0003_auto_20170707_1656.py mode change 100644 => 100755 sapl/parlamentares/migrations/0004_auto_20170711_1305.py mode change 100644 => 100755 sapl/parlamentares/migrations/0005_auto_20170814_1615.py mode change 100644 => 100755 sapl/parlamentares/migrations/0006_auto_20170831_1400.py mode change 100644 => 100755 sapl/parlamentares/migrations/0007_adiciona_partidos.py mode change 100644 => 100755 sapl/parlamentares/migrations/0008_adiciona_cargos_mesa.py mode change 100644 => 100755 sapl/parlamentares/migrations/0009_auto_20170905_1617.py mode change 100644 => 100755 sapl/parlamentares/migrations/0010_corrige_data_inicio_mandato.py mode change 100644 => 100755 sapl/parlamentares/migrations/0011_auto_20171010_1433.py mode change 100644 => 100755 sapl/parlamentares/migrations/0012_auto_20171020_1045.py mode change 100644 => 100755 sapl/parlamentares/migrations/0013_auto_20180130_1425.py mode change 100644 => 100755 sapl/parlamentares/migrations/0014_auto_20180131_1014.py mode change 100644 => 100755 sapl/parlamentares/migrations/0015_auto_20180131_1629.py mode change 100644 => 100755 sapl/parlamentares/migrations/0016_auto_20180202_1331.py mode change 100644 => 100755 sapl/parlamentares/migrations/0017_auto_20180202_1528.py mode change 100644 => 100755 sapl/parlamentares/migrations/0018_auto_20180215_1015.py mode change 100644 => 100755 sapl/parlamentares/migrations/0019_auto_20180221_1155.py mode change 100644 => 100755 sapl/parlamentares/migrations/0020_fix_inicio_mandato.py mode change 100644 => 100755 sapl/parlamentares/migrations/0021_clear_thumbnails_cache.py mode change 100644 => 100755 sapl/parlamentares/migrations/0022_partido_observacao.py mode change 100644 => 100755 sapl/parlamentares/migrations/0023_auto_20180626_1524.py mode change 100644 => 100755 sapl/parlamentares/migrations/0024_auto_20180814_1237.py mode change 100644 => 100755 sapl/parlamentares/migrations/__init__.py mode change 100644 => 100755 sapl/parlamentares/models.py mode change 100644 => 100755 sapl/parlamentares/tests/test_mandato.py mode change 100644 => 100755 sapl/parlamentares/tests/test_parlamentares.py mode change 100644 => 100755 sapl/parlamentares/urls.py mode change 100644 => 100755 sapl/parlamentares/views.py mode change 100644 => 100755 sapl/protocoloadm/__init__.py mode change 100644 => 100755 sapl/protocoloadm/admin.py mode change 100644 => 100755 sapl/protocoloadm/apps.py mode change 100644 => 100755 sapl/protocoloadm/forms.py mode change 100644 => 100755 sapl/protocoloadm/legacy.yaml mode change 100644 => 100755 sapl/protocoloadm/migrations/0001_initial.py mode change 100644 => 100755 sapl/protocoloadm/migrations/0002_remove_documentoadministrativo_numero_protocolo.py mode change 100644 => 100755 sapl/protocoloadm/migrations/0003_auto_20180103_1343.py mode change 100644 => 100755 sapl/protocoloadm/migrations/0004_documentoadministrativo_numero_externo.py mode change 100644 => 100755 sapl/protocoloadm/migrations/0005_auto_20180824_1241.py mode change 100644 => 100755 sapl/protocoloadm/migrations/0006_documentoadministrativo_restrito.py mode change 100644 => 100755 sapl/protocoloadm/migrations/__init__.py mode change 100644 => 100755 sapl/protocoloadm/models.py mode change 100644 => 100755 sapl/protocoloadm/tests/test_protocoloadm.py mode change 100644 => 100755 sapl/protocoloadm/urls.py mode change 100644 => 100755 sapl/protocoloadm/views.py mode change 100644 => 100755 sapl/redireciona_urls/__init__.py mode change 100644 => 100755 sapl/redireciona_urls/apps.py mode change 100644 => 100755 sapl/redireciona_urls/exceptions.py mode change 100644 => 100755 sapl/redireciona_urls/tests.py mode change 100644 => 100755 sapl/redireciona_urls/urls.py mode change 100644 => 100755 sapl/redireciona_urls/views.py mode change 100644 => 100755 sapl/relatorios/__init__.py mode change 100644 => 100755 sapl/relatorios/admin.py mode change 100644 => 100755 sapl/relatorios/apps.py mode change 100644 => 100755 sapl/relatorios/models.py mode change 100644 => 100755 sapl/relatorios/templates/mensagem_emitir_proc.dtml mode change 100644 => 100755 sapl/relatorios/templates/pdf_detalhe_materia_preparar_pysc.py mode change 100644 => 100755 sapl/relatorios/templates/pdf_espelho_gerar.py mode change 100644 => 100755 sapl/relatorios/templates/pdf_espelho_preparar_pysc.py mode change 100644 => 100755 sapl/relatorios/templates/pdf_materia_preparar_pysc.py mode change 100644 => 100755 sapl/relatorios/templates/pdf_ordem_dia_preparar_pysc.py mode change 100644 => 100755 sapl/relatorios/templates/pdf_sessao_plenaria_gerar.py mode change 100644 => 100755 sapl/relatorios/templates/pdf_sessao_plenaria_preparar_pysc.py mode change 100644 => 100755 sapl/relatorios/tests.py mode change 100644 => 100755 sapl/relatorios/urls.py mode change 100644 => 100755 sapl/relatorios/views.py mode change 100644 => 100755 sapl/rules/__init__.py mode change 100644 => 100755 sapl/rules/apps.py mode change 100644 => 100755 sapl/rules/map_rules.py mode change 100644 => 100755 sapl/rules/models.py mode change 100644 => 100755 sapl/rules/tests/test_rules.py mode change 100644 => 100755 sapl/sessao/__init__.py mode change 100644 => 100755 sapl/sessao/admin.py mode change 100644 => 100755 sapl/sessao/apps.py mode change 100644 => 100755 sapl/sessao/forms.py mode change 100644 => 100755 sapl/sessao/legacy.yaml mode change 100644 => 100755 sapl/sessao/migrations/0001_initial.py mode change 100644 => 100755 sapl/sessao/migrations/0002_sessaoplenaria_interativa.py mode change 100644 => 100755 sapl/sessao/migrations/0003_resumoordenacao.py mode change 100644 => 100755 sapl/sessao/migrations/0004_votonominal_registro_votacao.py mode change 100644 => 100755 sapl/sessao/migrations/0005_auto_20170601_1246.py mode change 100644 => 100755 sapl/sessao/migrations/0006_auto_20170601_1257.py mode change 100644 => 100755 sapl/sessao/migrations/0007_auto_20170606_1238.py mode change 100644 => 100755 sapl/sessao/migrations/0008_auto_20170607_1220.py mode change 100644 => 100755 sapl/sessao/migrations/0009_auto_20170619_1441.py mode change 100644 => 100755 sapl/sessao/migrations/0010_auto_20170810_1033.py mode change 100644 => 100755 sapl/sessao/migrations/0010_auto_20170814_1804.py mode change 100644 => 100755 sapl/sessao/migrations/0011_auto_20170814_1409.py mode change 100644 => 100755 sapl/sessao/migrations/0011_auto_20170814_1849.py mode change 100644 => 100755 sapl/sessao/migrations/0012_auto_20170814_1615.py mode change 100644 => 100755 sapl/sessao/migrations/0012_auto_20170815_1244.py mode change 100644 => 100755 sapl/sessao/migrations/0013_merge.py mode change 100644 => 100755 sapl/sessao/migrations/0014_auto_20170905_1617.py mode change 100644 => 100755 sapl/sessao/migrations/0015_sessaoplenaria_painel_aberto.py mode change 100644 => 100755 sapl/sessao/migrations/0016_auto_20180131_1708.py mode change 100644 => 100755 sapl/sessao/migrations/0017_auto_20180316_0731.py mode change 100644 => 100755 sapl/sessao/migrations/0018_auto_20180327_1433.py mode change 100644 => 100755 sapl/sessao/migrations/0019_auto_20180404_1437.py mode change 100644 => 100755 sapl/sessao/migrations/0020_auto_20180416_1424.py mode change 100644 => 100755 sapl/sessao/migrations/0021_auto_20180417_1209.py mode change 100644 => 100755 sapl/sessao/migrations/0022_auto_20180618_1625.py mode change 100644 => 100755 sapl/sessao/migrations/0023_auto_20180914_1315.py mode change 100644 => 100755 sapl/sessao/migrations/0024_ocorrenciasessao.py mode change 100644 => 100755 sapl/sessao/migrations/0025_auto_20180919_1116.py mode change 100644 => 100755 sapl/sessao/migrations/__init__.py mode change 100644 => 100755 sapl/sessao/models.py mode change 100644 => 100755 sapl/sessao/serializers.py mode change 100644 => 100755 sapl/sessao/tests/test_sessao.py mode change 100644 => 100755 sapl/sessao/tests/test_sessao_view.py mode change 100644 => 100755 sapl/sessao/urls.py mode change 100644 => 100755 sapl/sessao/views.py mode change 100644 => 100755 sapl/settings.py mode change 100644 => 100755 sapl/static/audio/ring.mp3 mode change 100644 => 100755 sapl/static/img/arrow.png mode change 100644 => 100755 sapl/static/img/authenticated.png mode change 100644 => 100755 sapl/static/img/avatar.png mode change 100644 => 100755 sapl/static/img/beta.png mode change 100644 => 100755 sapl/static/img/brasao_transp.gif mode change 100644 => 100755 sapl/static/img/down_arrow_select.jpg mode change 100644 => 100755 sapl/static/img/etiqueta.png mode change 100644 => 100755 sapl/static/img/favicon.ico mode change 100644 => 100755 sapl/static/img/file.png mode change 100644 => 100755 sapl/static/img/hand-note.png mode change 100644 => 100755 sapl/static/img/icon_comissoes.png mode change 100644 => 100755 sapl/static/img/icon_delete_white.png mode change 100644 => 100755 sapl/static/img/icon_materia_legislativa.png mode change 100644 => 100755 sapl/static/img/icon_mesa_diretora.png mode change 100644 => 100755 sapl/static/img/icon_normas_juridicas.png mode change 100644 => 100755 sapl/static/img/icon_parlamentares.png mode change 100644 => 100755 sapl/static/img/icon_pautas.png mode change 100644 => 100755 sapl/static/img/icon_plenarias.png mode change 100644 => 100755 sapl/static/img/icon_relatorios.png mode change 100644 => 100755 sapl/static/img/icon_save_white.png mode change 100644 => 100755 sapl/static/img/lexml.gif mode change 100644 => 100755 sapl/static/img/logo.png mode change 100644 => 100755 sapl/static/img/logo_cc.png mode change 100644 => 100755 sapl/static/img/logo_interlegis.png mode change 100644 => 100755 sapl/static/img/manual.png mode change 100644 => 100755 sapl/static/img/pdflogo.png mode change 100644 => 100755 sapl/static/img/perfil.png mode change 100644 => 100755 sapl/static/img/search-gray.png mode change 100644 => 100755 sapl/static/img/search.png mode change 100644 => 100755 sapl/static/img/user.png mode change 100644 => 100755 sapl/static/js/app.js mode change 100644 => 100755 sapl/static/js/compilacao.js mode change 100644 => 100755 sapl/static/js/compilacao_edit.js mode change 100644 => 100755 sapl/static/js/compilacao_notas.js mode change 100644 => 100755 sapl/static/js/compilacao_view.js mode change 100644 => 100755 sapl/static/js/jquery.runner.js mode change 100644 => 100755 sapl/static/styles/_header.scss mode change 100644 => 100755 sapl/static/styles/app.scss mode change 100644 => 100755 sapl/static/styles/compilacao.scss mode change 100644 => 100755 sapl/temp_suppress_crispy_form_warnings.py mode change 100644 => 100755 sapl/templates/ajuda.html mode change 100644 => 100755 sapl/templates/ajuda/acessando_alimenta.html mode change 100644 => 100755 sapl/templates/ajuda/acomp_materia.html mode change 100644 => 100755 sapl/templates/ajuda/anexos.html mode change 100644 => 100755 sapl/templates/ajuda/autor.html mode change 100644 => 100755 sapl/templates/ajuda/cadastro_comissoes.html mode change 100644 => 100755 sapl/templates/ajuda/cadastro_materia.html mode change 100644 => 100755 sapl/templates/ajuda/cadastro_mesa_diretora.html mode change 100644 => 100755 sapl/templates/ajuda/cadastro_parlamentares.html mode change 100644 => 100755 sapl/templates/ajuda/cargo_comissao.html mode change 100644 => 100755 sapl/templates/ajuda/cargo_mesa.html mode change 100644 => 100755 sapl/templates/ajuda/casa_legislativa.html mode change 100644 => 100755 sapl/templates/ajuda/coligacao.html mode change 100644 => 100755 sapl/templates/ajuda/consultas.html mode change 100644 => 100755 sapl/templates/ajuda/dependentes.html mode change 100644 => 100755 sapl/templates/ajuda/despacho_autoria.html mode change 100644 => 100755 sapl/templates/ajuda/envio_proposicao.html mode change 100644 => 100755 sapl/templates/ajuda/filiacoes_partidarias.html mode change 100644 => 100755 sapl/templates/ajuda/fim_relatoria.html mode change 100644 => 100755 sapl/templates/ajuda/gerenciamento_usuarios.html mode change 100644 => 100755 sapl/templates/ajuda/glossario.html mode change 100644 => 100755 sapl/templates/ajuda/impressos.html mode change 100644 => 100755 sapl/templates/ajuda/legislacao_cita_matanexada.html mode change 100644 => 100755 sapl/templates/ajuda/legislatura.html mode change 100644 => 100755 sapl/templates/ajuda/lexml.html mode change 100644 => 100755 sapl/templates/ajuda/mandatos_parlamentar.html mode change 100644 => 100755 sapl/templates/ajuda/materia_anexada.html mode change 100644 => 100755 sapl/templates/ajuda/modulo_comissoes.html mode change 100644 => 100755 sapl/templates/ajuda/modulo_mesa_diretora.html mode change 100644 => 100755 sapl/templates/ajuda/modulo_norma_juridica.html mode change 100644 => 100755 sapl/templates/ajuda/modulo_parlamentares.html mode change 100644 => 100755 sapl/templates/ajuda/modulo_tramitacao_materias.html mode change 100644 => 100755 sapl/templates/ajuda/nivel_instrucao.html mode change 100644 => 100755 sapl/templates/ajuda/norma_juridica.html mode change 100644 => 100755 sapl/templates/ajuda/numeracao_docsacess.html mode change 100644 => 100755 sapl/templates/ajuda/ordem_dia.html mode change 100644 => 100755 sapl/templates/ajuda/orgao.html mode change 100644 => 100755 sapl/templates/ajuda/origem.html mode change 100644 => 100755 sapl/templates/ajuda/partidos.html mode change 100644 => 100755 sapl/templates/ajuda/periodo_composicao_comissao.html mode change 100644 => 100755 sapl/templates/ajuda/proposicao.html mode change 100644 => 100755 sapl/templates/ajuda/proposicao_editor.html mode change 100644 => 100755 sapl/templates/ajuda/proposicao_legislativa.html mode change 100644 => 100755 sapl/templates/ajuda/protocolo_administrativo.html mode change 100644 => 100755 sapl/templates/ajuda/protocolo_anular.html mode change 100644 => 100755 sapl/templates/ajuda/protocolo_geral.html mode change 100644 => 100755 sapl/templates/ajuda/protocolo_gerar_etiqueta_processo.html mode change 100644 => 100755 sapl/templates/ajuda/protocolo_gerar_etiqueta_protocolo.html mode change 100644 => 100755 sapl/templates/ajuda/protocolo_legislativo.html mode change 100644 => 100755 sapl/templates/ajuda/recebimento_proposicao.html mode change 100644 => 100755 sapl/templates/ajuda/regime_tramitacao.html mode change 100644 => 100755 sapl/templates/ajuda/relatorios.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_legislativa.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_plenaria.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_plenaria_ata.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_plenaria_expedientes.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_plenaria_lista_presenca_sessao.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_plenaria_materias_expediente.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_plenaria_materias_ordem_dia.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_plenaria_mesa.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_plenaria_oradores.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_plenaria_oradores_expediente.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_plenaria_oradores_explicacoes_pessoais.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_plenaria_presenca_ordem_dia.html mode change 100644 => 100755 sapl/templates/ajuda/sessao_plenaria_votacao.html mode change 100644 => 100755 sapl/templates/ajuda/status_tramitacao.html mode change 100644 => 100755 sapl/templates/ajuda/tipo_afastamento.html mode change 100644 => 100755 sapl/templates/ajuda/tipo_autor.html mode change 100644 => 100755 sapl/templates/ajuda/tipo_comissao.html mode change 100644 => 100755 sapl/templates/ajuda/tipo_dependente.html mode change 100644 => 100755 sapl/templates/ajuda/tipo_documento.html mode change 100644 => 100755 sapl/templates/ajuda/tipo_materia_legislativa.html mode change 100644 => 100755 sapl/templates/ajuda/tipo_norma_juridica.html mode change 100644 => 100755 sapl/templates/ajuda/tipo_proposicao.html mode change 100644 => 100755 sapl/templates/ajuda/tipo_sessao_plenaria.html mode change 100644 => 100755 sapl/templates/ajuda/tipo_situa_militar.html mode change 100644 => 100755 sapl/templates/ajuda/tramitacao_lote.html mode change 100644 => 100755 sapl/templates/ajuda/tramitacao_relatoria.html mode change 100644 => 100755 sapl/templates/ajuda/troca_senha.html mode change 100644 => 100755 sapl/templates/ajuda/unidade_tramitacao.html mode change 100644 => 100755 sapl/templates/audiencia/layouts.yaml mode change 100644 => 100755 sapl/templates/auth/user_form.html mode change 100644 => 100755 sapl/templates/auth/user_list.html mode change 100644 => 100755 sapl/templates/base.html mode change 100644 => 100755 sapl/templates/base/RelatorioAtas_filter.html mode change 100644 => 100755 sapl/templates/base/RelatorioAudiencia_filter.html mode change 100644 => 100755 sapl/templates/base/RelatorioDataFimPrazoTramitacao_filter.html mode change 100644 => 100755 sapl/templates/base/RelatorioHistoricoTramitacao_filter.html mode change 100644 => 100755 sapl/templates/base/RelatorioMateriasPorAnoAutorTipo_filter.html mode change 100644 => 100755 sapl/templates/base/RelatorioMateriasPorAutor_filter.html mode change 100644 => 100755 sapl/templates/base/RelatorioMateriasPorTramitacao_filter.html mode change 100644 => 100755 sapl/templates/base/RelatorioPresencaSessao_filter.html mode change 100644 => 100755 sapl/templates/base/RelatorioReuniao_filter.html mode change 100644 => 100755 sapl/templates/base/alterar_senha.html mode change 100644 => 100755 sapl/templates/base/autor_form.html mode change 100644 => 100755 sapl/templates/base/casalegislativa_list.html mode change 100644 => 100755 sapl/templates/base/layouts.yaml mode change 100644 => 100755 sapl/templates/base/login.html mode change 100644 => 100755 sapl/templates/base/nova_senha_form.html mode change 100644 => 100755 sapl/templates/base/recupera_senha_email_enviado.html mode change 100644 => 100755 sapl/templates/base/recuperar_senha_completo.html mode change 100644 => 100755 sapl/templates/base/recuperar_senha_email.html mode change 100644 => 100755 sapl/templates/base/recuperar_senha_email_form.html mode change 100644 => 100755 sapl/templates/base/relatorios_list.html mode change 100644 => 100755 sapl/templates/base/tipoautor_list.html mode change 100644 => 100755 sapl/templates/comissoes/cadastro_reuniao.html mode change 100644 => 100755 sapl/templates/comissoes/cadastro_reuniao_edit.html mode change 100644 => 100755 sapl/templates/comissoes/comissao_parlamentar.html mode change 100644 => 100755 sapl/templates/comissoes/comissao_parlamentar_edit.html mode change 100644 => 100755 sapl/templates/comissoes/composicao_list.html mode change 100644 => 100755 sapl/templates/comissoes/layouts.yaml mode change 100644 => 100755 sapl/templates/comissoes/materias.html mode change 100644 => 100755 sapl/templates/comissoes/materias_em_tramitacao.html mode change 100644 => 100755 sapl/templates/comissoes/subnav.yaml mode change 100644 => 100755 sapl/templates/compilacao/ajax_actions_dinamic_edit.html mode change 100644 => 100755 sapl/templates/compilacao/ajax_actions_registro_inclusao.html mode change 100644 => 100755 sapl/templates/compilacao/ajax_form.html mode change 100644 => 100755 sapl/templates/compilacao/dispositivo_form.html mode change 100644 => 100755 sapl/templates/compilacao/dispositivo_form_alteracao.html mode change 100644 => 100755 sapl/templates/compilacao/dispositivo_form_definidor_vigencia.html mode change 100644 => 100755 sapl/templates/compilacao/dispositivo_form_edicao_basica.html mode change 100644 => 100755 sapl/templates/compilacao/dispositivo_form_parents.html mode change 100644 => 100755 sapl/templates/compilacao/dispositivo_form_search.html mode change 100644 => 100755 sapl/templates/compilacao/dispositivo_form_search_fragment.html mode change 100644 => 100755 sapl/templates/compilacao/dispositivo_form_vigencia.html mode change 100644 => 100755 sapl/templates/compilacao/layout/bootstrap_btn_checkbox.html mode change 100644 => 100755 sapl/templates/compilacao/layout/dispositivo_checkbox.html mode change 100644 => 100755 sapl/templates/compilacao/layout/dispositivo_radio.html mode change 100644 => 100755 sapl/templates/compilacao/layouts.yaml mode change 100644 => 100755 sapl/templates/compilacao/publicacao_detail.html mode change 100644 => 100755 sapl/templates/compilacao/publicacao_list.html mode change 100644 => 100755 sapl/templates/compilacao/text_edit.html mode change 100644 => 100755 sapl/templates/compilacao/text_edit_bloco.html mode change 100644 => 100755 sapl/templates/compilacao/text_edit_blocoalteracao.html mode change 100644 => 100755 sapl/templates/compilacao/text_list.html mode change 100644 => 100755 sapl/templates/compilacao/text_list__print_version.html mode change 100644 => 100755 sapl/templates/compilacao/text_list_bloco.html mode change 100644 => 100755 sapl/templates/compilacao/text_list_blocoalteracao.html mode change 100644 => 100755 sapl/templates/compilacao/text_notificacoes.html mode change 100644 => 100755 sapl/templates/compilacao/textoarticulado_detail.html mode change 100644 => 100755 sapl/templates/compilacao/textoarticulado_list.html mode change 100644 => 100755 sapl/templates/compilacao/textoarticulado_menu_config.html mode change 100644 => 100755 sapl/templates/compilacao/tipotextoarticulado_detail.html mode change 100644 => 100755 sapl/templates/compilacao/tipotextoarticulado_list.html mode change 100644 => 100755 sapl/templates/crud/ajax_form.html mode change 100644 => 100755 sapl/templates/crud/confirm_delete.html mode change 100644 => 100755 sapl/templates/crud/detail.html mode change 100644 => 100755 sapl/templates/crud/detail_detail.html mode change 100644 => 100755 sapl/templates/crud/form.html mode change 100644 => 100755 sapl/templates/crud/list.html mode change 100644 => 100755 sapl/templates/crud/list_tabaux.html mode change 100644 => 100755 sapl/templates/email/acompanhar.html mode change 100644 => 100755 sapl/templates/email/acompanhar.txt mode change 100644 => 100755 sapl/templates/email/confirma.html mode change 100644 => 100755 sapl/templates/email/test_tramitacao.html mode change 100644 => 100755 sapl/templates/email/tramitacao.html mode change 100644 => 100755 sapl/templates/email/tramitacao.txt mode change 100644 => 100755 sapl/templates/floppyforms/image_thumbnail.html mode change 100644 => 100755 sapl/templates/index.html mode change 100644 => 100755 sapl/templates/lexml/layouts.yaml mode change 100644 => 100755 sapl/templates/materia/acompanhamento_materia.html mode change 100644 => 100755 sapl/templates/materia/adicionar_varias_autorias.html mode change 100644 => 100755 sapl/templates/materia/autoria_form.html mode change 100644 => 100755 sapl/templates/materia/autoria_list.html mode change 100644 => 100755 sapl/templates/materia/autoria_multicreate_form.html mode change 100644 => 100755 sapl/templates/materia/confirmar_proposicao.html mode change 100644 => 100755 sapl/templates/materia/documentoacessorio_form.html mode change 100644 => 100755 sapl/templates/materia/em_lote/acessorio.html mode change 100644 => 100755 sapl/templates/materia/em_lote/excluir_tramitacao.html mode change 100644 => 100755 sapl/templates/materia/em_lote/subnav_em_lote.yaml mode change 100644 => 100755 sapl/templates/materia/em_lote/tramitacao.html mode change 100644 => 100755 sapl/templates/materia/formulario_simplificado.html mode change 100644 => 100755 sapl/templates/materia/impressos/etiqueta.html mode change 100644 => 100755 sapl/templates/materia/impressos/etiqueta_pdf.html mode change 100644 => 100755 sapl/templates/materia/impressos/ficha.html mode change 100644 => 100755 sapl/templates/materia/impressos/ficha_pdf.html mode change 100644 => 100755 sapl/templates/materia/impressos/ficha_seleciona.html mode change 100644 => 100755 sapl/templates/materia/impressos/impressos.html mode change 100644 => 100755 sapl/templates/materia/impressos/norma.html mode change 100644 => 100755 sapl/templates/materia/impressos/normas_pdf.html mode change 100644 => 100755 sapl/templates/materia/impressos/pdf.html mode change 100644 => 100755 sapl/templates/materia/layouts.yaml mode change 100644 => 100755 sapl/templates/materia/materialegislativa_detail.html mode change 100644 => 100755 sapl/templates/materia/materialegislativa_filter.html mode change 100644 => 100755 sapl/templates/materia/materialegislativa_form.html mode change 100644 => 100755 sapl/templates/materia/materialegislativa_list.html mode change 100644 => 100755 sapl/templates/materia/prop_devolvidas_list.html mode change 100644 => 100755 sapl/templates/materia/prop_pendentes_list.html mode change 100644 => 100755 sapl/templates/materia/prop_recebidas_list.html mode change 100644 => 100755 sapl/templates/materia/proposicao_confirm_delete.html mode change 100644 => 100755 sapl/templates/materia/proposicao_confirm_return.html mode change 100644 => 100755 sapl/templates/materia/proposicao_detail.html mode change 100644 => 100755 sapl/templates/materia/proposicao_form.html mode change 100644 => 100755 sapl/templates/materia/recibo_proposicao.html mode change 100644 => 100755 sapl/templates/materia/relatoria_form.html mode change 100644 => 100755 sapl/templates/materia/resumo_detail_materia.html mode change 100644 => 100755 sapl/templates/materia/subnav.yaml mode change 100644 => 100755 sapl/templates/materia/subnav_prop.yaml mode change 100644 => 100755 sapl/templates/materia/tipoproposicao_form.html mode change 100644 => 100755 sapl/templates/materia/tramitacao_form.html mode change 100644 => 100755 sapl/templates/menu_tabelas_auxiliares.yaml mode change 100644 => 100755 sapl/templates/menus/menu.html mode change 100644 => 100755 sapl/templates/menus/nav.html mode change 100644 => 100755 sapl/templates/menus/subnav.html mode change 100644 => 100755 sapl/templates/navbar.yaml mode change 100644 => 100755 sapl/templates/norma/layouts.yaml mode change 100644 => 100755 sapl/templates/norma/normajuridica_detail.html mode change 100644 => 100755 sapl/templates/norma/normajuridica_filter.html mode change 100644 => 100755 sapl/templates/norma/normajuridica_form.html mode change 100644 => 100755 sapl/templates/norma/normarelacionada_form.html mode change 100644 => 100755 sapl/templates/norma/subnav.yaml mode change 100644 => 100755 sapl/templates/paginacao.html mode change 100644 => 100755 sapl/templates/painel/index.html mode change 100644 => 100755 sapl/templates/painel/layouts.yaml mode change 100644 => 100755 sapl/templates/painel/mensagem.html mode change 100644 => 100755 sapl/templates/painel/parlamentares.html mode change 100644 => 100755 sapl/templates/painel/votacao.html mode change 100644 => 100755 sapl/templates/painel/voto_nominal.html mode change 100644 => 100755 sapl/templates/parlamentares/composicaomesa_form.html mode change 100644 => 100755 sapl/templates/parlamentares/frente_form.html mode change 100644 => 100755 sapl/templates/parlamentares/layouts.yaml mode change 100644 => 100755 sapl/templates/parlamentares/materias.html mode change 100644 => 100755 sapl/templates/parlamentares/parlamentar_perfil_publico.html mode change 100644 => 100755 sapl/templates/parlamentares/parlamentares_list.html mode change 100644 => 100755 sapl/templates/parlamentares/public_composicaomesa_form.html mode change 100644 => 100755 sapl/templates/parlamentares/subnav.yaml mode change 100644 => 100755 sapl/templates/parlamentares/subnav_coligacao.yaml mode change 100644 => 100755 sapl/templates/parlamentares/votante_list.html mode change 100644 => 100755 sapl/templates/protocoloadm/MateriaTemplate.html mode change 100644 => 100755 sapl/templates/protocoloadm/anular_protocoloadm.html mode change 100644 => 100755 sapl/templates/protocoloadm/comprovante.html mode change 100644 => 100755 sapl/templates/protocoloadm/criar_documento.html mode change 100644 => 100755 sapl/templates/protocoloadm/detail_doc_adm.html mode change 100644 => 100755 sapl/templates/protocoloadm/detail_doc_detail.html mode change 100644 => 100755 sapl/templates/protocoloadm/documento_acessorio_administrativo.html mode change 100644 => 100755 sapl/templates/protocoloadm/documento_acessorio_administrativo_edit.html mode change 100644 => 100755 sapl/templates/protocoloadm/documentoadministrativo_filter.html mode change 100644 => 100755 sapl/templates/protocoloadm/documentoadministrativo_form.html mode change 100644 => 100755 sapl/templates/protocoloadm/layouts.yaml mode change 100644 => 100755 sapl/templates/protocoloadm/pesquisa_documento_detail.html mode change 100644 => 100755 sapl/templates/protocoloadm/proposicao_receber.html mode change 100644 => 100755 sapl/templates/protocoloadm/proposicao_view.html mode change 100644 => 100755 sapl/templates/protocoloadm/proposicoes.html mode change 100644 => 100755 sapl/templates/protocoloadm/proposicoes_detail.html mode change 100644 => 100755 sapl/templates/protocoloadm/proposicoes_incorporadas.html mode change 100644 => 100755 sapl/templates/protocoloadm/proposicoes_naoincorporadas.html mode change 100644 => 100755 sapl/templates/protocoloadm/proposicoes_naorecebidas.html mode change 100644 => 100755 sapl/templates/protocoloadm/protocolar_documento.html mode change 100644 => 100755 sapl/templates/protocoloadm/protocolar_materia.html mode change 100644 => 100755 sapl/templates/protocoloadm/protocolo_filter.html mode change 100644 => 100755 sapl/templates/protocoloadm/protocolo_list.html mode change 100644 => 100755 sapl/templates/protocoloadm/protocolo_mostrar.html mode change 100644 => 100755 sapl/templates/protocoloadm/protocoloadm_detail.html mode change 100644 => 100755 sapl/templates/protocoloadm/subnav.yaml mode change 100644 => 100755 sapl/templates/protocoloadm/tramitacaoadministrativo_detail.html mode change 100644 => 100755 sapl/templates/protocoloadm/tramitacaoadministrativo_form.html mode change 100644 => 100755 sapl/templates/rest_framework_docs/base.html mode change 100644 => 100755 sapl/templates/rest_framework_docs/home.html mode change 100644 => 100755 sapl/templates/search/indexes/materia/documentoacessorio_text.txt mode change 100644 => 100755 sapl/templates/search/indexes/materia/materialegislativa_text.txt mode change 100644 => 100755 sapl/templates/search/indexes/norma/normajuridica_text.txt mode change 100644 => 100755 sapl/templates/search/search.html mode change 100644 => 100755 sapl/templates/sessao/adicionar_varias_materias_expediente.html mode change 100644 => 100755 sapl/templates/sessao/adicionar_varias_materias_ordem.html mode change 100644 => 100755 sapl/templates/sessao/blocos_ata/assinaturas.html mode change 100644 => 100755 sapl/templates/sessao/blocos_ata/conteudo_multimidia.html mode change 100644 => 100755 sapl/templates/sessao/blocos_ata/expedientes.html mode change 100644 => 100755 sapl/templates/sessao/blocos_ata/identificacao_basica.html mode change 100644 => 100755 sapl/templates/sessao/blocos_ata/lista_presenca.html mode change 100644 => 100755 sapl/templates/sessao/blocos_ata/lista_presenca_ordem_dia.html mode change 100644 => 100755 sapl/templates/sessao/blocos_ata/materias_expediente.html mode change 100644 => 100755 sapl/templates/sessao/blocos_ata/materias_ordem_dia.html mode change 100644 => 100755 sapl/templates/sessao/blocos_ata/mesa_diretora.html mode change 100644 => 100755 sapl/templates/sessao/blocos_ata/ocorrencias_da_sessao.html mode change 100644 => 100755 sapl/templates/sessao/blocos_ata/oradores_expediente.html mode change 100644 => 100755 sapl/templates/sessao/blocos_ata/oradores_explicacoes.html mode change 100644 => 100755 sapl/templates/sessao/blocos_resumo/conteudo_multimidia.html mode change 100644 => 100755 sapl/templates/sessao/blocos_resumo/expedientes.html mode change 100644 => 100755 sapl/templates/sessao/blocos_resumo/identificacao_basica.html mode change 100644 => 100755 sapl/templates/sessao/blocos_resumo/lista_presenca.html mode change 100644 => 100755 sapl/templates/sessao/blocos_resumo/lista_presenca_ordem_dia.html mode change 100644 => 100755 sapl/templates/sessao/blocos_resumo/materias_expediente.html mode change 100644 => 100755 sapl/templates/sessao/blocos_resumo/materias_ordem_dia.html mode change 100644 => 100755 sapl/templates/sessao/blocos_resumo/mesa_diretora.html mode change 100644 => 100755 sapl/templates/sessao/blocos_resumo/ocorrencias_da_sessao.html mode change 100644 => 100755 sapl/templates/sessao/blocos_resumo/oradores_expediente.html mode change 100644 => 100755 sapl/templates/sessao/blocos_resumo/oradores_explicacoes.html mode change 100644 => 100755 sapl/templates/sessao/expediente.html mode change 100644 => 100755 sapl/templates/sessao/expedientemateria_form.html mode change 100644 => 100755 sapl/templates/sessao/expedientemateria_list.html mode change 100644 => 100755 sapl/templates/sessao/layouts.yaml mode change 100644 => 100755 sapl/templates/sessao/mesa.html mode change 100644 => 100755 sapl/templates/sessao/ocorrencia_sessao.html mode change 100644 => 100755 sapl/templates/sessao/ordemdia_form.html mode change 100644 => 100755 sapl/templates/sessao/ordemdia_list.html mode change 100644 => 100755 sapl/templates/sessao/painel.html mode change 100644 => 100755 sapl/templates/sessao/pauta_inexistente.html mode change 100644 => 100755 sapl/templates/sessao/pauta_sessao_detail.html mode change 100644 => 100755 sapl/templates/sessao/pauta_sessao_filter.html mode change 100644 => 100755 sapl/templates/sessao/pauta_sessao_list.html mode change 100644 => 100755 sapl/templates/sessao/pauta_subnav.yaml mode change 100644 => 100755 sapl/templates/sessao/presenca.html mode change 100644 => 100755 sapl/templates/sessao/presenca_ordemdia.html mode change 100644 => 100755 sapl/templates/sessao/resumo.html mode change 100644 => 100755 sapl/templates/sessao/resumo_ata.html mode change 100644 => 100755 sapl/templates/sessao/resumo_ordenacao.html mode change 100644 => 100755 sapl/templates/sessao/sessaoplenaria_filter.html mode change 100644 => 100755 sapl/templates/sessao/sessaoplenaria_form.html mode change 100644 => 100755 sapl/templates/sessao/sessaoplenaria_list.html mode change 100644 => 100755 sapl/templates/sessao/subnav.yaml mode change 100644 => 100755 sapl/templates/sessao/votacao/nominal.html mode change 100644 => 100755 sapl/templates/sessao/votacao/nominal_detail.html mode change 100644 => 100755 sapl/templates/sessao/votacao/nominal_edit.html mode change 100644 => 100755 sapl/templates/sessao/votacao/nominal_transparencia.html mode change 100644 => 100755 sapl/templates/sessao/votacao/simbolica_transparencia.html mode change 100644 => 100755 sapl/templates/sessao/votacao/votacao.html mode change 100644 => 100755 sapl/templates/sessao/votacao/votacao_edit.html mode change 100644 => 100755 sapl/templates/sistema.html mode change 100644 => 100755 sapl/test_crispy_layout_mixin.py mode change 100644 => 100755 sapl/test_general.py mode change 100644 => 100755 sapl/test_urls.py mode change 100644 => 100755 sapl/test_utils.py mode change 100644 => 100755 sapl/urls.py mode change 100644 => 100755 sapl/utils.py mode change 100644 => 100755 sapl/wsgi.py mode change 100644 => 100755 scripts/anonimizador/anon.py mode change 100644 => 100755 scripts/anonimizador/nomes.txt mode change 100644 => 100755 scripts/anonimizador/paragrafos.txt mode change 100644 => 100755 scripts/convert_null_to_empty_in_all_char_fields.py mode change 100644 => 100755 scripts/fk_protocoloadm_docadm.py mode change 100644 => 100755 scripts/hooks/pre-commit mode change 100644 => 100755 scripts/id_numero_legislatura.py mode change 100644 => 100755 scripts/legacy_db_checks.sql mode change 100644 => 100755 scripts/lista_permissions_in_decorators.py mode change 100644 => 100755 scripts/lista_urls.py mode change 100644 => 100755 scripts/redbaron.py mode change 100644 => 100755 scripts/set_inicio_mandato.py mode change 100644 => 100755 scripts/voto_parlamentar.sql mode change 100644 => 100755 setup.py mode change 100644 => 100755 test_hashers.py diff --git a/.coveragerc b/.coveragerc old mode 100644 new mode 100755 diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md old mode 100644 new mode 100755 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.travis.yml b/.travis.yml old mode 100644 new mode 100755 diff --git a/.tx/config b/.tx/config old mode 100644 new mode 100755 diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 diff --git a/LICENSE.txt b/LICENSE.txt old mode 100644 new mode 100755 diff --git a/MANIFEST.in b/MANIFEST.in old mode 100644 new mode 100755 diff --git a/README.rst b/README.rst old mode 100644 new mode 100755 diff --git a/busy-wait.sh b/busy-wait.sh old mode 100644 new mode 100755 diff --git a/codeclimate.yml b/codeclimate.yml old mode 100644 new mode 100755 diff --git a/config/env-sample b/config/env-sample old mode 100644 new mode 100755 diff --git a/config/env_dockerfile b/config/env_dockerfile old mode 100644 new mode 100755 diff --git a/config/nginx/nginx.conf b/config/nginx/nginx.conf old mode 100644 new mode 100755 diff --git a/config/nginx/sapl.conf b/config/nginx/sapl.conf old mode 100644 new mode 100755 diff --git a/conftest.py b/conftest.py old mode 100644 new mode 100755 diff --git a/docker-compose.yml b/docker-compose.yml old mode 100644 new mode 100755 diff --git a/docker-env.sh b/docker-env.sh old mode 100644 new mode 100755 diff --git a/docs/CODE_OF_CONDUCT.md b/docs/CODE_OF_CONDUCT.md old mode 100644 new mode 100755 diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/docs/credits.txt b/docs/credits.txt old mode 100644 new mode 100755 diff --git a/docs/deploy.rst b/docs/deploy.rst old mode 100644 new mode 100755 diff --git a/docs/howtogit.rst b/docs/howtogit.rst old mode 100644 new mode 100755 diff --git a/docs/implementacoes.rst b/docs/implementacoes.rst old mode 100644 new mode 100755 diff --git a/docs/instalacao31.rst b/docs/instalacao31.rst old mode 100644 new mode 100755 diff --git a/docs/logo_partidos.rst b/docs/logo_partidos.rst old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/dem.png b/docs/logo_partidos/dem.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/pdt.png b/docs/logo_partidos/pdt.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/pfl.png b/docs/logo_partidos/pfl.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/phs.png b/docs/logo_partidos/phs.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/pl.png b/docs/logo_partidos/pl.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/pmdb.png b/docs/logo_partidos/pmdb.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/pmn.png b/docs/logo_partidos/pmn.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/pp.png b/docs/logo_partidos/pp.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/pps.png b/docs/logo_partidos/pps.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/prb.png b/docs/logo_partidos/prb.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/prona.png b/docs/logo_partidos/prona.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/prp.png b/docs/logo_partidos/prp.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/prtb.png b/docs/logo_partidos/prtb.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/psb.png b/docs/logo_partidos/psb.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/psc.png b/docs/logo_partidos/psc.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/psdb.png b/docs/logo_partidos/psdb.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/psdc.png b/docs/logo_partidos/psdc.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/psl.png b/docs/logo_partidos/psl.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/psol.png b/docs/logo_partidos/psol.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/pt.png b/docs/logo_partidos/pt.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/ptb.png b/docs/logo_partidos/ptb.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/ptc.png b/docs/logo_partidos/ptc.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/ptdob.png b/docs/logo_partidos/ptdob.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/ptn.png b/docs/logo_partidos/ptn.png old mode 100644 new mode 100755 diff --git a/docs/logo_partidos/pv.png b/docs/logo_partidos/pv.png old mode 100644 new mode 100755 diff --git a/docs/solr.rst b/docs/solr.rst old mode 100644 new mode 100755 diff --git a/docs/traducao.rst b/docs/traducao.rst old mode 100644 new mode 100755 diff --git a/genkey.py b/genkey.py old mode 100644 new mode 100755 diff --git a/media/.gitkeep b/media/.gitkeep old mode 100644 new mode 100755 diff --git a/pytest.ini b/pytest.ini old mode 100644 new mode 100755 diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt old mode 100644 new mode 100755 diff --git a/requirements/migration-requirements.txt b/requirements/migration-requirements.txt old mode 100644 new mode 100755 diff --git a/requirements/requirements.txt b/requirements/requirements.txt old mode 100644 new mode 100755 diff --git a/requirements/test-requirements.txt b/requirements/test-requirements.txt old mode 100644 new mode 100755 diff --git a/sapl/.env_test b/sapl/.env_test old mode 100644 new mode 100755 diff --git a/sapl/__init__.py b/sapl/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/api/__init__.py b/sapl/api/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/api/admin.py b/sapl/api/admin.py old mode 100644 new mode 100755 diff --git a/sapl/api/apps.py b/sapl/api/apps.py old mode 100644 new mode 100755 diff --git a/sapl/api/forms.py b/sapl/api/forms.py old mode 100644 new mode 100755 diff --git a/sapl/api/pagination.py b/sapl/api/pagination.py old mode 100644 new mode 100755 diff --git a/sapl/api/permissions.py b/sapl/api/permissions.py old mode 100644 new mode 100755 diff --git a/sapl/api/serializers.py b/sapl/api/serializers.py old mode 100644 new mode 100755 diff --git a/sapl/api/urls.py b/sapl/api/urls.py old mode 100644 new mode 100755 diff --git a/sapl/api/views.py b/sapl/api/views.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/__init__.py b/sapl/audiencia/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/admin.py b/sapl/audiencia/admin.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/apps.py b/sapl/audiencia/apps.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/forms.py b/sapl/audiencia/forms.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/migrations/0001_initial.py b/sapl/audiencia/migrations/0001_initial.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/migrations/0002_auto_20180302_0926.py b/sapl/audiencia/migrations/0002_auto_20180302_0926.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/migrations/0003_auto_20180302_1111.py b/sapl/audiencia/migrations/0003_auto_20180302_1111.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/migrations/0004_auto_20180305_1006.py b/sapl/audiencia/migrations/0004_auto_20180305_1006.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/migrations/0005_auto_20180806_1236.py b/sapl/audiencia/migrations/0005_auto_20180806_1236.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/migrations/0006_auto_20180808_0856.py b/sapl/audiencia/migrations/0006_auto_20180808_0856.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/migrations/__init__.py b/sapl/audiencia/migrations/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/models.py b/sapl/audiencia/models.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/tests/test_audiencia.py b/sapl/audiencia/tests/test_audiencia.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/urls.py b/sapl/audiencia/urls.py old mode 100644 new mode 100755 diff --git a/sapl/audiencia/views.py b/sapl/audiencia/views.py old mode 100644 new mode 100755 diff --git a/sapl/base/__init__.py b/sapl/base/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/base/admin.py b/sapl/base/admin.py old mode 100644 new mode 100755 diff --git a/sapl/base/apps.py b/sapl/base/apps.py old mode 100644 new mode 100755 diff --git a/sapl/base/forms.py b/sapl/base/forms.py old mode 100644 new mode 100755 diff --git a/sapl/base/legacy.yaml b/sapl/base/legacy.yaml old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0001_initial.py b/sapl/base/migrations/0001_initial.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0002_auto_20170331_1900.py b/sapl/base/migrations/0002_auto_20170331_1900.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0003_auto_20170519_1106.py b/sapl/base/migrations/0003_auto_20170519_1106.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0004_auto_20170714_1838.py b/sapl/base/migrations/0004_auto_20170714_1838.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0005_auto_20170802_1428.py b/sapl/base/migrations/0005_auto_20170802_1428.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0006_auto_20170802_1908.py b/sapl/base/migrations/0006_auto_20170802_1908.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0007_auto_20170808_0850.py b/sapl/base/migrations/0007_auto_20170808_0850.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0008_auto_20170814_1409.py b/sapl/base/migrations/0008_auto_20170814_1409.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0009_appconfig_mostrar_brasao_painel.py b/sapl/base/migrations/0009_appconfig_mostrar_brasao_painel.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0010_remove_appconfig_painel_aberto.py b/sapl/base/migrations/0010_remove_appconfig_painel_aberto.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0011_auto_20171121_0958.py b/sapl/base/migrations/0011_auto_20171121_0958.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0012_auto_20171205_0917.py b/sapl/base/migrations/0012_auto_20171205_0917.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0013_auto_20180201_1338.py b/sapl/base/migrations/0013_auto_20180201_1338.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0014_auto_20180219_1402.py b/sapl/base/migrations/0014_auto_20180219_1402.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0015_appconfig_receber_recibo_proposicao.py b/sapl/base/migrations/0015_appconfig_receber_recibo_proposicao.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0016_auto_20180326_1840.py b/sapl/base/migrations/0016_auto_20180326_1840.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0017_appconfig_cronometro_consideracoes.py b/sapl/base/migrations/0017_appconfig_cronometro_consideracoes.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0018_auto_20180801_1652.py b/sapl/base/migrations/0018_auto_20180801_1652.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0019_auto_20180815_1025.py b/sapl/base/migrations/0019_auto_20180815_1025.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0020_auto_20180821_1421.py b/sapl/base/migrations/0020_auto_20180821_1421.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/0021_appconfig_esfera_federacao.py b/sapl/base/migrations/0021_appconfig_esfera_federacao.py old mode 100644 new mode 100755 diff --git a/sapl/base/migrations/__init__.py b/sapl/base/migrations/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/base/models.py b/sapl/base/models.py old mode 100644 new mode 100755 diff --git a/sapl/base/search_indexes.py b/sapl/base/search_indexes.py old mode 100644 new mode 100755 diff --git a/sapl/base/templatetags/__init__.py b/sapl/base/templatetags/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/base/templatetags/base_tags.py b/sapl/base/templatetags/base_tags.py old mode 100644 new mode 100755 diff --git a/sapl/base/templatetags/common_tags.py b/sapl/base/templatetags/common_tags.py old mode 100644 new mode 100755 diff --git a/sapl/base/templatetags/menus.py b/sapl/base/templatetags/menus.py old mode 100644 new mode 100755 diff --git a/sapl/base/tests/test_form.py b/sapl/base/tests/test_form.py old mode 100644 new mode 100755 diff --git a/sapl/base/tests/test_view_base.py b/sapl/base/tests/test_view_base.py old mode 100644 new mode 100755 diff --git a/sapl/base/tests/teststub_urls.py b/sapl/base/tests/teststub_urls.py old mode 100644 new mode 100755 diff --git a/sapl/base/urls.py b/sapl/base/urls.py old mode 100644 new mode 100755 diff --git a/sapl/base/views.py b/sapl/base/views.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/__init__.py b/sapl/comissoes/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/admin.py b/sapl/comissoes/admin.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/apps.py b/sapl/comissoes/apps.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/forms.py b/sapl/comissoes/forms.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/legacy.yaml b/sapl/comissoes/legacy.yaml old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0001_initial.py b/sapl/comissoes/migrations/0001_initial.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0002_auto_20170809_1236.py b/sapl/comissoes/migrations/0002_auto_20170809_1236.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0003_auto_20171204_1658.py b/sapl/comissoes/migrations/0003_auto_20171204_1658.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0003_reuniao.py b/sapl/comissoes/migrations/0003_reuniao.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0004_auto_20180102_1652.py b/sapl/comissoes/migrations/0004_auto_20180102_1652.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0005_merge.py b/sapl/comissoes/migrations/0005_merge.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0006_auto_20180227_0842.py b/sapl/comissoes/migrations/0006_auto_20180227_0842.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0007_auto_20180227_1025.py b/sapl/comissoes/migrations/0007_auto_20180227_1025.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0008_auto_20180227_1111.py b/sapl/comissoes/migrations/0008_auto_20180227_1111.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0009_auto_20180301_1011.py b/sapl/comissoes/migrations/0009_auto_20180301_1011.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0010_auto_20180306_0918.py b/sapl/comissoes/migrations/0010_auto_20180306_0918.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0010_auto_20180307_1645.py b/sapl/comissoes/migrations/0010_auto_20180307_1645.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0011_merge.py b/sapl/comissoes/migrations/0011_merge.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0012_documentoacessorio.py b/sapl/comissoes/migrations/0012_documentoacessorio.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0013_auto_20180312_1533.py b/sapl/comissoes/migrations/0013_auto_20180312_1533.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0014_auto_20180503_1055.py b/sapl/comissoes/migrations/0014_auto_20180503_1055.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0015_auto_20180613_2023.py b/sapl/comissoes/migrations/0015_auto_20180613_2023.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0016_auto_20180613_2121.py b/sapl/comissoes/migrations/0016_auto_20180613_2121.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/0017_auto_20180717_0827.py b/sapl/comissoes/migrations/0017_auto_20180717_0827.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/migrations/__init__.py b/sapl/comissoes/migrations/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/models.py b/sapl/comissoes/models.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/tests/test_comissoes.py b/sapl/comissoes/tests/test_comissoes.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/urls.py b/sapl/comissoes/urls.py old mode 100644 new mode 100755 diff --git a/sapl/comissoes/views.py b/sapl/comissoes/views.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/__init__.py b/sapl/compilacao/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/admin.py b/sapl/compilacao/admin.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/apps.py b/sapl/compilacao/apps.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/compilacao_data_tables.sql b/sapl/compilacao/compilacao_data_tables.sql old mode 100644 new mode 100755 diff --git a/sapl/compilacao/forms.py b/sapl/compilacao/forms.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/migrations/0001_initial.py b/sapl/compilacao/migrations/0001_initial.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/migrations/0002_auto_20170825_1108.py b/sapl/compilacao/migrations/0002_auto_20170825_1108.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/migrations/0003_auto_20170825_1136.py b/sapl/compilacao/migrations/0003_auto_20170825_1136.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/migrations/0004_auto_20171031_1327.py b/sapl/compilacao/migrations/0004_auto_20171031_1327.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/migrations/0005_auto_20180319_1041.py b/sapl/compilacao/migrations/0005_auto_20180319_1041.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/migrations/0006_auto_20180321_1054.py b/sapl/compilacao/migrations/0006_auto_20180321_1054.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/migrations/0007_auto_20180911_1600.py b/sapl/compilacao/migrations/0007_auto_20180911_1600.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/migrations/__init__.py b/sapl/compilacao/migrations/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/models.py b/sapl/compilacao/models.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/templatetags/__init__.py b/sapl/compilacao/templatetags/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/templatetags/compilacao_filters.py b/sapl/compilacao/templatetags/compilacao_filters.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/tests/test_tipo_texto_articulado_form.py b/sapl/compilacao/tests/test_tipo_texto_articulado_form.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/urls.py b/sapl/compilacao/urls.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/utils.py b/sapl/compilacao/utils.py old mode 100644 new mode 100755 diff --git a/sapl/compilacao/views.py b/sapl/compilacao/views.py old mode 100644 new mode 100755 diff --git a/sapl/context_processors.py b/sapl/context_processors.py old mode 100644 new mode 100755 diff --git a/sapl/crispy_layout_mixin.py b/sapl/crispy_layout_mixin.py old mode 100644 new mode 100755 diff --git a/sapl/crud/__init__.py b/sapl/crud/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/crud/base.py b/sapl/crud/base.py old mode 100644 new mode 100755 diff --git a/sapl/crud/tests/__init__.py b/sapl/crud/tests/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/crud/tests/settings.py b/sapl/crud/tests/settings.py old mode 100644 new mode 100755 diff --git a/sapl/crud/tests/stub_app/layouts.yaml b/sapl/crud/tests/stub_app/layouts.yaml old mode 100644 new mode 100755 diff --git a/sapl/crud/tests/stub_app/models.py b/sapl/crud/tests/stub_app/models.py old mode 100644 new mode 100755 diff --git a/sapl/crud/tests/stub_app/templates/base.html b/sapl/crud/tests/stub_app/templates/base.html old mode 100644 new mode 100755 diff --git a/sapl/crud/tests/stub_app/urls.py b/sapl/crud/tests/stub_app/urls.py old mode 100644 new mode 100755 diff --git a/sapl/crud/tests/stub_app/views.py b/sapl/crud/tests/stub_app/views.py old mode 100644 new mode 100755 diff --git a/sapl/crud/tests/test_base.py b/sapl/crud/tests/test_base.py old mode 100644 new mode 100755 diff --git a/sapl/crud/tests/test_masterdetail.py b/sapl/crud/tests/test_masterdetail.py old mode 100644 new mode 100755 diff --git a/sapl/crud/urls.py b/sapl/crud/urls.py old mode 100644 new mode 100755 diff --git a/sapl/decorators.py b/sapl/decorators.py old mode 100644 new mode 100755 diff --git a/sapl/env-backup b/sapl/env-backup old mode 100644 new mode 100755 diff --git a/sapl/hashers.py b/sapl/hashers.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/Docs/verificação verbose names.txt b/sapl/legacy/Docs/verificação verbose names.txt old mode 100644 new mode 100755 diff --git a/sapl/legacy/__init__.py b/sapl/legacy/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/admin.py b/sapl/legacy/admin.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/management/__init__.py b/sapl/legacy/management/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/management/commands/__init__.py b/sapl/legacy/management/commands/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/management/commands/migracao_25_31.py b/sapl/legacy/management/commands/migracao_25_31.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/management/commands/migracao_documentos.py b/sapl/legacy/management/commands/migracao_documentos.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/management/commands/ressucitar_deps.py b/sapl/legacy/management/commands/ressucitar_deps.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/migracao.py b/sapl/legacy/migracao.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/migracao_dados.py b/sapl/legacy/migracao_dados.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/migracao_documentos.py b/sapl/legacy/migracao_documentos.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/migracao_usuarios.py b/sapl/legacy/migracao_usuarios.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/models.py b/sapl/legacy/models.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/router.py b/sapl/legacy/router.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/scripts/__init__.py b/sapl/legacy/scripts/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/scripts/exporta_zope/.gitignore b/sapl/legacy/scripts/exporta_zope/.gitignore old mode 100644 new mode 100755 diff --git a/sapl/legacy/scripts/exporta_zope/dump30.py b/sapl/legacy/scripts/exporta_zope/dump30.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/scripts/exporta_zope/requirements.txt b/sapl/legacy/scripts/exporta_zope/requirements.txt old mode 100644 new mode 100755 diff --git a/sapl/legacy/scripts/exporta_zope/variaveis_comuns.py b/sapl/legacy/scripts/exporta_zope/variaveis_comuns.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/scripts/ressucita_dependencias.py b/sapl/legacy/scripts/ressucita_dependencias.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/scripts/utils.py b/sapl/legacy/scripts/utils.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/test_migracao_dados.py b/sapl/legacy/test_migracao_dados.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/test_renames.py b/sapl/legacy/test_renames.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/timezonesbrasil.py b/sapl/legacy/timezonesbrasil.py old mode 100644 new mode 100755 diff --git a/sapl/legacy/views.py b/sapl/legacy/views.py old mode 100644 new mode 100755 diff --git a/sapl/legacy_migration_settings.py b/sapl/legacy_migration_settings.py old mode 100644 new mode 100755 diff --git a/sapl/lexml/__init__.py b/sapl/lexml/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/lexml/admin.py b/sapl/lexml/admin.py old mode 100644 new mode 100755 diff --git a/sapl/lexml/apps.py b/sapl/lexml/apps.py old mode 100644 new mode 100755 diff --git a/sapl/lexml/legacy.yaml b/sapl/lexml/legacy.yaml old mode 100644 new mode 100755 diff --git a/sapl/lexml/migrations/0001_initial.py b/sapl/lexml/migrations/0001_initial.py old mode 100644 new mode 100755 diff --git a/sapl/lexml/migrations/__init__.py b/sapl/lexml/migrations/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/lexml/models.py b/sapl/lexml/models.py old mode 100644 new mode 100755 diff --git a/sapl/lexml/urls.py b/sapl/lexml/urls.py old mode 100644 new mode 100755 diff --git a/sapl/lexml/views.py b/sapl/lexml/views.py old mode 100644 new mode 100755 diff --git a/sapl/locale/en/LC_MESSAGES/django.po b/sapl/locale/en/LC_MESSAGES/django.po old mode 100644 new mode 100755 diff --git a/sapl/locale/es/LC_MESSAGES/django.po b/sapl/locale/es/LC_MESSAGES/django.po old mode 100644 new mode 100755 diff --git a/sapl/locale/pt_BR/LC_MESSAGES/django.po b/sapl/locale/pt_BR/LC_MESSAGES/django.po old mode 100644 new mode 100755 diff --git a/sapl/materia/__init__.py b/sapl/materia/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/materia/admin.py b/sapl/materia/admin.py old mode 100644 new mode 100755 diff --git a/sapl/materia/apps.py b/sapl/materia/apps.py old mode 100644 new mode 100755 diff --git a/sapl/materia/email_utils.py b/sapl/materia/email_utils.py old mode 100644 new mode 100755 diff --git a/sapl/materia/fixtures/pre_popula_status_tramitacao.json b/sapl/materia/fixtures/pre_popula_status_tramitacao.json old mode 100644 new mode 100755 diff --git a/sapl/materia/forms.py b/sapl/materia/forms.py old mode 100644 new mode 100755 diff --git a/sapl/materia/legacy.yaml b/sapl/materia/legacy.yaml old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0001_initial.py b/sapl/materia/migrations/0001_initial.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0002_auto_20170330_1513.py b/sapl/materia/migrations/0002_auto_20170330_1513.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0003_auto_20170403_1505.py b/sapl/materia/migrations/0003_auto_20170403_1505.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0004_auto_20170504_1751.py b/sapl/materia/migrations/0004_auto_20170504_1751.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0005_auto_20170522_1051.py b/sapl/materia/migrations/0005_auto_20170522_1051.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0005_auto_20170522_1904.py b/sapl/materia/migrations/0005_auto_20170522_1904.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0006_merge.py b/sapl/materia/migrations/0006_merge.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0007_auto_20170620_1252.py b/sapl/materia/migrations/0007_auto_20170620_1252.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0008_auto_20170622_1527.py b/sapl/materia/migrations/0008_auto_20170622_1527.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0009_auto_20170712_0951.py b/sapl/materia/migrations/0009_auto_20170712_0951.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0010_auto_20170808_0850.py b/sapl/materia/migrations/0010_auto_20170808_0850.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0011_auto_20170808_1034.py b/sapl/materia/migrations/0011_auto_20170808_1034.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0012_auto_20170815_1238.py b/sapl/materia/migrations/0012_auto_20170815_1238.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0012_auto_20170829_1321.py b/sapl/materia/migrations/0012_auto_20170829_1321.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0013_adiciona_status_tramitacao.py b/sapl/materia/migrations/0013_adiciona_status_tramitacao.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0013_auto_20170816_1136.py b/sapl/materia/migrations/0013_auto_20170816_1136.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0014_auto_20170905_0818.py b/sapl/materia/migrations/0014_auto_20170905_0818.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0015_auto_20170908_1024.py b/sapl/materia/migrations/0015_auto_20170908_1024.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0016_merge.py b/sapl/materia/migrations/0016_merge.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0017_auto_20170918_1257.py b/sapl/materia/migrations/0017_auto_20170918_1257.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0018_auto_20171113_1339.py b/sapl/materia/migrations/0018_auto_20171113_1339.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0019_auto_20171127_1500.py b/sapl/materia/migrations/0019_auto_20171127_1500.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0020_auto_20171204_1658.py b/sapl/materia/migrations/0020_auto_20171204_1658.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0021_auto_20180103_1343.py b/sapl/materia/migrations/0021_auto_20180103_1343.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0022_auto_20180206_0908.py b/sapl/materia/migrations/0022_auto_20180206_0908.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0023_proposicao_hash_code.py b/sapl/materia/migrations/0023_proposicao_hash_code.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0024_tipomaterialegislativa_sequencia_numeracao.py b/sapl/materia/migrations/0024_tipomaterialegislativa_sequencia_numeracao.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0025_auto_20180221_1649.py b/sapl/materia/migrations/0025_auto_20180221_1649.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0026_auto_20180302_1411.py b/sapl/materia/migrations/0026_auto_20180302_1411.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0027_auto_20180409_1443.py b/sapl/materia/migrations/0027_auto_20180409_1443.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0028_auto_20180418_1629.py b/sapl/materia/migrations/0028_auto_20180418_1629.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0029_auto_20180901_1628.py b/sapl/materia/migrations/0029_auto_20180901_1628.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/0030_tramitacao_timestamp.py b/sapl/materia/migrations/0030_tramitacao_timestamp.py old mode 100644 new mode 100755 diff --git a/sapl/materia/migrations/__init__.py b/sapl/materia/migrations/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/materia/models.py b/sapl/materia/models.py old mode 100644 new mode 100755 diff --git a/sapl/materia/receivers.py b/sapl/materia/receivers.py old mode 100644 new mode 100755 diff --git a/sapl/materia/signals.py b/sapl/materia/signals.py old mode 100644 new mode 100755 diff --git a/sapl/materia/tests/test_email_templates.py b/sapl/materia/tests/test_email_templates.py old mode 100644 new mode 100755 diff --git a/sapl/materia/tests/test_materia.py b/sapl/materia/tests/test_materia.py old mode 100644 new mode 100755 diff --git a/sapl/materia/tests/test_materia_form.py b/sapl/materia/tests/test_materia_form.py old mode 100644 new mode 100755 diff --git a/sapl/materia/tests/test_materia_urls.py b/sapl/materia/tests/test_materia_urls.py old mode 100644 new mode 100755 diff --git a/sapl/materia/urls.py b/sapl/materia/urls.py old mode 100644 new mode 100755 diff --git a/sapl/materia/views.py b/sapl/materia/views.py old mode 100644 new mode 100755 diff --git a/sapl/norma/__init__.py b/sapl/norma/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/norma/admin.py b/sapl/norma/admin.py old mode 100644 new mode 100755 diff --git a/sapl/norma/apps.py b/sapl/norma/apps.py old mode 100644 new mode 100755 diff --git a/sapl/norma/fixtures/pre_popula_tipo_vinculo_norma.json b/sapl/norma/fixtures/pre_popula_tipo_vinculo_norma.json old mode 100644 new mode 100755 diff --git a/sapl/norma/forms.py b/sapl/norma/forms.py old mode 100644 new mode 100755 diff --git a/sapl/norma/legacy.yaml b/sapl/norma/legacy.yaml old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0001_initial.py b/sapl/norma/migrations/0001_initial.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0002_auto_20170403_1505.py b/sapl/norma/migrations/0002_auto_20170403_1505.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0003_auto_20170510_1549.py b/sapl/norma/migrations/0003_auto_20170510_1549.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0004_auto_20170522_1051.py b/sapl/norma/migrations/0004_auto_20170522_1051.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0004_auto_20170522_1115.py b/sapl/norma/migrations/0004_auto_20170522_1115.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0005_merge.py b/sapl/norma/migrations/0005_merge.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0006_normajuridica_data_ultima_atualizacao.py b/sapl/norma/migrations/0006_normajuridica_data_ultima_atualizacao.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0007_auto_20170904_1708.py b/sapl/norma/migrations/0007_auto_20170904_1708.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0008_normajuridica_popula_tipo_vinculo_norma.py b/sapl/norma/migrations/0008_normajuridica_popula_tipo_vinculo_norma.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0009_auto_20171113_1339.py b/sapl/norma/migrations/0009_auto_20171113_1339.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0010_auto_20180103_1343.py b/sapl/norma/migrations/0010_auto_20180103_1343.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0011_auto_20180220_1859.py b/sapl/norma/migrations/0011_auto_20180220_1859.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0012_anexonormajuridica.py b/sapl/norma/migrations/0012_anexonormajuridica.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/0013_anexonormajuridica_assunto_anexo.py b/sapl/norma/migrations/0013_anexonormajuridica_assunto_anexo.py old mode 100644 new mode 100755 diff --git a/sapl/norma/migrations/__init__.py b/sapl/norma/migrations/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/norma/models.py b/sapl/norma/models.py old mode 100644 new mode 100755 diff --git a/sapl/norma/signals.py b/sapl/norma/signals.py old mode 100644 new mode 100755 diff --git a/sapl/norma/tests/test_norma.py b/sapl/norma/tests/test_norma.py old mode 100644 new mode 100755 diff --git a/sapl/norma/urls.py b/sapl/norma/urls.py old mode 100644 new mode 100755 diff --git a/sapl/norma/views.py b/sapl/norma/views.py old mode 100644 new mode 100755 diff --git a/sapl/painel/__init__.py b/sapl/painel/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/painel/admin.py b/sapl/painel/admin.py old mode 100644 new mode 100755 diff --git a/sapl/painel/apps.py b/sapl/painel/apps.py old mode 100644 new mode 100755 diff --git a/sapl/painel/migrations/0001_initial.py b/sapl/painel/migrations/0001_initial.py old mode 100644 new mode 100755 diff --git a/sapl/painel/migrations/0002_auto_20180523_1430.py b/sapl/painel/migrations/0002_auto_20180523_1430.py old mode 100644 new mode 100755 diff --git a/sapl/painel/migrations/__init__.py b/sapl/painel/migrations/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/painel/models.py b/sapl/painel/models.py old mode 100644 new mode 100755 diff --git a/sapl/painel/tests/tests.py b/sapl/painel/tests/tests.py old mode 100644 new mode 100755 diff --git a/sapl/painel/urls.py b/sapl/painel/urls.py old mode 100644 new mode 100755 diff --git a/sapl/painel/views.py b/sapl/painel/views.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/__init__.py b/sapl/parlamentares/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/admin.py b/sapl/parlamentares/admin.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/apps.py b/sapl/parlamentares/apps.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/fixtures/pre_popula_cargosmesa.json b/sapl/parlamentares/fixtures/pre_popula_cargosmesa.json old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/fixtures/pre_popula_partidos.json b/sapl/parlamentares/fixtures/pre_popula_partidos.json old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/forms.py b/sapl/parlamentares/forms.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/legacy.yaml b/sapl/parlamentares/legacy.yaml old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0001_initial.py b/sapl/parlamentares/migrations/0001_initial.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0002_auto_20170504_1751.py b/sapl/parlamentares/migrations/0002_auto_20170504_1751.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0003_auto_20170707_1656.py b/sapl/parlamentares/migrations/0003_auto_20170707_1656.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0004_auto_20170711_1305.py b/sapl/parlamentares/migrations/0004_auto_20170711_1305.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0005_auto_20170814_1615.py b/sapl/parlamentares/migrations/0005_auto_20170814_1615.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0006_auto_20170831_1400.py b/sapl/parlamentares/migrations/0006_auto_20170831_1400.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0007_adiciona_partidos.py b/sapl/parlamentares/migrations/0007_adiciona_partidos.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0008_adiciona_cargos_mesa.py b/sapl/parlamentares/migrations/0008_adiciona_cargos_mesa.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0009_auto_20170905_1617.py b/sapl/parlamentares/migrations/0009_auto_20170905_1617.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0010_corrige_data_inicio_mandato.py b/sapl/parlamentares/migrations/0010_corrige_data_inicio_mandato.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0011_auto_20171010_1433.py b/sapl/parlamentares/migrations/0011_auto_20171010_1433.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0012_auto_20171020_1045.py b/sapl/parlamentares/migrations/0012_auto_20171020_1045.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0013_auto_20180130_1425.py b/sapl/parlamentares/migrations/0013_auto_20180130_1425.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0014_auto_20180131_1014.py b/sapl/parlamentares/migrations/0014_auto_20180131_1014.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0015_auto_20180131_1629.py b/sapl/parlamentares/migrations/0015_auto_20180131_1629.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0016_auto_20180202_1331.py b/sapl/parlamentares/migrations/0016_auto_20180202_1331.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0017_auto_20180202_1528.py b/sapl/parlamentares/migrations/0017_auto_20180202_1528.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0018_auto_20180215_1015.py b/sapl/parlamentares/migrations/0018_auto_20180215_1015.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0019_auto_20180221_1155.py b/sapl/parlamentares/migrations/0019_auto_20180221_1155.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0020_fix_inicio_mandato.py b/sapl/parlamentares/migrations/0020_fix_inicio_mandato.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0021_clear_thumbnails_cache.py b/sapl/parlamentares/migrations/0021_clear_thumbnails_cache.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0022_partido_observacao.py b/sapl/parlamentares/migrations/0022_partido_observacao.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0023_auto_20180626_1524.py b/sapl/parlamentares/migrations/0023_auto_20180626_1524.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/0024_auto_20180814_1237.py b/sapl/parlamentares/migrations/0024_auto_20180814_1237.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/migrations/__init__.py b/sapl/parlamentares/migrations/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/models.py b/sapl/parlamentares/models.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/tests/test_mandato.py b/sapl/parlamentares/tests/test_mandato.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/tests/test_parlamentares.py b/sapl/parlamentares/tests/test_parlamentares.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/urls.py b/sapl/parlamentares/urls.py old mode 100644 new mode 100755 diff --git a/sapl/parlamentares/views.py b/sapl/parlamentares/views.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/__init__.py b/sapl/protocoloadm/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/admin.py b/sapl/protocoloadm/admin.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/apps.py b/sapl/protocoloadm/apps.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/forms.py b/sapl/protocoloadm/forms.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/legacy.yaml b/sapl/protocoloadm/legacy.yaml old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/migrations/0001_initial.py b/sapl/protocoloadm/migrations/0001_initial.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/migrations/0002_remove_documentoadministrativo_numero_protocolo.py b/sapl/protocoloadm/migrations/0002_remove_documentoadministrativo_numero_protocolo.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/migrations/0003_auto_20180103_1343.py b/sapl/protocoloadm/migrations/0003_auto_20180103_1343.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/migrations/0004_documentoadministrativo_numero_externo.py b/sapl/protocoloadm/migrations/0004_documentoadministrativo_numero_externo.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/migrations/0005_auto_20180824_1241.py b/sapl/protocoloadm/migrations/0005_auto_20180824_1241.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/migrations/0006_documentoadministrativo_restrito.py b/sapl/protocoloadm/migrations/0006_documentoadministrativo_restrito.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/migrations/__init__.py b/sapl/protocoloadm/migrations/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/models.py b/sapl/protocoloadm/models.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/tests/test_protocoloadm.py b/sapl/protocoloadm/tests/test_protocoloadm.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/urls.py b/sapl/protocoloadm/urls.py old mode 100644 new mode 100755 diff --git a/sapl/protocoloadm/views.py b/sapl/protocoloadm/views.py old mode 100644 new mode 100755 diff --git a/sapl/redireciona_urls/__init__.py b/sapl/redireciona_urls/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/redireciona_urls/apps.py b/sapl/redireciona_urls/apps.py old mode 100644 new mode 100755 diff --git a/sapl/redireciona_urls/exceptions.py b/sapl/redireciona_urls/exceptions.py old mode 100644 new mode 100755 diff --git a/sapl/redireciona_urls/tests.py b/sapl/redireciona_urls/tests.py old mode 100644 new mode 100755 diff --git a/sapl/redireciona_urls/urls.py b/sapl/redireciona_urls/urls.py old mode 100644 new mode 100755 diff --git a/sapl/redireciona_urls/views.py b/sapl/redireciona_urls/views.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/__init__.py b/sapl/relatorios/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/admin.py b/sapl/relatorios/admin.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/apps.py b/sapl/relatorios/apps.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/models.py b/sapl/relatorios/models.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/templates/mensagem_emitir_proc.dtml b/sapl/relatorios/templates/mensagem_emitir_proc.dtml old mode 100644 new mode 100755 diff --git a/sapl/relatorios/templates/pdf_detalhe_materia_preparar_pysc.py b/sapl/relatorios/templates/pdf_detalhe_materia_preparar_pysc.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/templates/pdf_espelho_gerar.py b/sapl/relatorios/templates/pdf_espelho_gerar.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/templates/pdf_espelho_preparar_pysc.py b/sapl/relatorios/templates/pdf_espelho_preparar_pysc.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/templates/pdf_materia_preparar_pysc.py b/sapl/relatorios/templates/pdf_materia_preparar_pysc.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/templates/pdf_ordem_dia_preparar_pysc.py b/sapl/relatorios/templates/pdf_ordem_dia_preparar_pysc.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/templates/pdf_sessao_plenaria_gerar.py b/sapl/relatorios/templates/pdf_sessao_plenaria_gerar.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/templates/pdf_sessao_plenaria_preparar_pysc.py b/sapl/relatorios/templates/pdf_sessao_plenaria_preparar_pysc.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/tests.py b/sapl/relatorios/tests.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/urls.py b/sapl/relatorios/urls.py old mode 100644 new mode 100755 diff --git a/sapl/relatorios/views.py b/sapl/relatorios/views.py old mode 100644 new mode 100755 diff --git a/sapl/rules/__init__.py b/sapl/rules/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/rules/apps.py b/sapl/rules/apps.py old mode 100644 new mode 100755 diff --git a/sapl/rules/map_rules.py b/sapl/rules/map_rules.py old mode 100644 new mode 100755 diff --git a/sapl/rules/models.py b/sapl/rules/models.py old mode 100644 new mode 100755 diff --git a/sapl/rules/tests/test_rules.py b/sapl/rules/tests/test_rules.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/__init__.py b/sapl/sessao/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/admin.py b/sapl/sessao/admin.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/apps.py b/sapl/sessao/apps.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/forms.py b/sapl/sessao/forms.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/legacy.yaml b/sapl/sessao/legacy.yaml old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0001_initial.py b/sapl/sessao/migrations/0001_initial.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0002_sessaoplenaria_interativa.py b/sapl/sessao/migrations/0002_sessaoplenaria_interativa.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0003_resumoordenacao.py b/sapl/sessao/migrations/0003_resumoordenacao.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0004_votonominal_registro_votacao.py b/sapl/sessao/migrations/0004_votonominal_registro_votacao.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0005_auto_20170601_1246.py b/sapl/sessao/migrations/0005_auto_20170601_1246.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0006_auto_20170601_1257.py b/sapl/sessao/migrations/0006_auto_20170601_1257.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0007_auto_20170606_1238.py b/sapl/sessao/migrations/0007_auto_20170606_1238.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0008_auto_20170607_1220.py b/sapl/sessao/migrations/0008_auto_20170607_1220.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0009_auto_20170619_1441.py b/sapl/sessao/migrations/0009_auto_20170619_1441.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0010_auto_20170810_1033.py b/sapl/sessao/migrations/0010_auto_20170810_1033.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0010_auto_20170814_1804.py b/sapl/sessao/migrations/0010_auto_20170814_1804.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0011_auto_20170814_1409.py b/sapl/sessao/migrations/0011_auto_20170814_1409.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0011_auto_20170814_1849.py b/sapl/sessao/migrations/0011_auto_20170814_1849.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0012_auto_20170814_1615.py b/sapl/sessao/migrations/0012_auto_20170814_1615.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0012_auto_20170815_1244.py b/sapl/sessao/migrations/0012_auto_20170815_1244.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0013_merge.py b/sapl/sessao/migrations/0013_merge.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0014_auto_20170905_1617.py b/sapl/sessao/migrations/0014_auto_20170905_1617.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0015_sessaoplenaria_painel_aberto.py b/sapl/sessao/migrations/0015_sessaoplenaria_painel_aberto.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0016_auto_20180131_1708.py b/sapl/sessao/migrations/0016_auto_20180131_1708.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0017_auto_20180316_0731.py b/sapl/sessao/migrations/0017_auto_20180316_0731.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0018_auto_20180327_1433.py b/sapl/sessao/migrations/0018_auto_20180327_1433.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0019_auto_20180404_1437.py b/sapl/sessao/migrations/0019_auto_20180404_1437.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0020_auto_20180416_1424.py b/sapl/sessao/migrations/0020_auto_20180416_1424.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0021_auto_20180417_1209.py b/sapl/sessao/migrations/0021_auto_20180417_1209.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0022_auto_20180618_1625.py b/sapl/sessao/migrations/0022_auto_20180618_1625.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0023_auto_20180914_1315.py b/sapl/sessao/migrations/0023_auto_20180914_1315.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0024_ocorrenciasessao.py b/sapl/sessao/migrations/0024_ocorrenciasessao.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/0025_auto_20180919_1116.py b/sapl/sessao/migrations/0025_auto_20180919_1116.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/migrations/__init__.py b/sapl/sessao/migrations/__init__.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/models.py b/sapl/sessao/models.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/serializers.py b/sapl/sessao/serializers.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/tests/test_sessao.py b/sapl/sessao/tests/test_sessao.py old mode 100644 new mode 100755 index 1715cd0ae..065cd58a1 --- a/sapl/sessao/tests/test_sessao.py +++ b/sapl/sessao/tests/test_sessao.py @@ -8,7 +8,7 @@ from sapl.materia.models import MateriaLegislativa, TipoMateriaLegislativa from sapl.parlamentares.models import Legislatura, Partido, SessaoLegislativa from sapl.sessao import forms from sapl.sessao.models import (ExpedienteMateria, OrdemDia, RegistroVotacao, - SessaoPlenaria, TipoSessaoPlenaria) + SessaoPlenaria, TipoSessaoPlenaria, OcorrenciaSessao) def test_valida_campos_obrigatorios_sessao_plenaria_form(): @@ -170,3 +170,12 @@ def test_registro_votacao_tem_ordem_xor_expediente(): # a validação NÃO funciona quando ambos são preenchidos with pytest.raises(ValidationError): registro_votacao_com(ordem, expediente).full_clean() + + +# @pytest.mark.django_db(transaction=False) +# def test_ocorrencias_da_sessao_conteudo(): +# +# ocorrencias = OcorrenciaSessao() +# ocorrencias.conteudo = "Teste Ocorrencias da Sessao - Conteudo Adicionado." +# +# assert(ocorrencias.conteudo, "Teste Ocorrencias da Sessao - Conteudo Adicionado.") diff --git a/sapl/sessao/tests/test_sessao_view.py b/sapl/sessao/tests/test_sessao_view.py old mode 100644 new mode 100755 index 17b77e8d8..80b268a2d --- a/sapl/sessao/tests/test_sessao_view.py +++ b/sapl/sessao/tests/test_sessao_view.py @@ -4,7 +4,7 @@ from django.utils.translation import ugettext_lazy as _ from model_mommy import mommy from sapl.parlamentares.models import Legislatura, SessaoLegislativa -from sapl.sessao.models import SessaoPlenaria, TipoSessaoPlenaria +from sapl.sessao.models import SessaoPlenaria, TipoSessaoPlenaria, OcorrenciaSessao @pytest.mark.django_db(transaction=False) @@ -47,3 +47,28 @@ def test_incluir_sessao_errors(admin_client): [_('Este campo é obrigatório.')]) assert (response.context_data['form'].errors['hora_inicio'] == [_('Este campo é obrigatório.')]) + +# +# @pytest.mark.django_db(transaction=False) +# def test_ocorrencias_da_sessao_salvar_conteudo(admin_client): +# +# response = admin_client.post(reverse('sapl.sessao:ocorrencia_sessao')) +# +# assert (response.status_code == 200) +# +# ocorrencia = OcorrenciaSessao.objects.first() +# +# assert (ocorrencia.conteudo, "Teste Ocorrencias da Sessao - Conteudo Adicionado.") +# +# response = admin_client.post(reverse('sapl.sessao:ocorrencia_sessao')) +# +# assert (response.status_code == 200) +# +# ocorrencia = OcorrenciaSessao.objects.first() +# +# assert (ocorrencia.conteudo, "") + +# +# @pytest.mark.django_db(transaction=False) +# def test_ocorrencias_da_sessao_apagar_conteudo(admin_client): +# diff --git a/sapl/sessao/urls.py b/sapl/sessao/urls.py old mode 100644 new mode 100755 diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py old mode 100644 new mode 100755 diff --git a/sapl/settings.py b/sapl/settings.py old mode 100644 new mode 100755 diff --git a/sapl/static/audio/ring.mp3 b/sapl/static/audio/ring.mp3 old mode 100644 new mode 100755 diff --git a/sapl/static/img/arrow.png b/sapl/static/img/arrow.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/authenticated.png b/sapl/static/img/authenticated.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/avatar.png b/sapl/static/img/avatar.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/beta.png b/sapl/static/img/beta.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/brasao_transp.gif b/sapl/static/img/brasao_transp.gif old mode 100644 new mode 100755 diff --git a/sapl/static/img/down_arrow_select.jpg b/sapl/static/img/down_arrow_select.jpg old mode 100644 new mode 100755 diff --git a/sapl/static/img/etiqueta.png b/sapl/static/img/etiqueta.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/favicon.ico b/sapl/static/img/favicon.ico old mode 100644 new mode 100755 diff --git a/sapl/static/img/file.png b/sapl/static/img/file.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/hand-note.png b/sapl/static/img/hand-note.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/icon_comissoes.png b/sapl/static/img/icon_comissoes.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/icon_delete_white.png b/sapl/static/img/icon_delete_white.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/icon_materia_legislativa.png b/sapl/static/img/icon_materia_legislativa.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/icon_mesa_diretora.png b/sapl/static/img/icon_mesa_diretora.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/icon_normas_juridicas.png b/sapl/static/img/icon_normas_juridicas.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/icon_parlamentares.png b/sapl/static/img/icon_parlamentares.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/icon_pautas.png b/sapl/static/img/icon_pautas.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/icon_plenarias.png b/sapl/static/img/icon_plenarias.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/icon_relatorios.png b/sapl/static/img/icon_relatorios.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/icon_save_white.png b/sapl/static/img/icon_save_white.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/lexml.gif b/sapl/static/img/lexml.gif old mode 100644 new mode 100755 diff --git a/sapl/static/img/logo.png b/sapl/static/img/logo.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/logo_cc.png b/sapl/static/img/logo_cc.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/logo_interlegis.png b/sapl/static/img/logo_interlegis.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/manual.png b/sapl/static/img/manual.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/pdflogo.png b/sapl/static/img/pdflogo.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/perfil.png b/sapl/static/img/perfil.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/search-gray.png b/sapl/static/img/search-gray.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/search.png b/sapl/static/img/search.png old mode 100644 new mode 100755 diff --git a/sapl/static/img/user.png b/sapl/static/img/user.png old mode 100644 new mode 100755 diff --git a/sapl/static/js/app.js b/sapl/static/js/app.js old mode 100644 new mode 100755 diff --git a/sapl/static/js/compilacao.js b/sapl/static/js/compilacao.js old mode 100644 new mode 100755 diff --git a/sapl/static/js/compilacao_edit.js b/sapl/static/js/compilacao_edit.js old mode 100644 new mode 100755 diff --git a/sapl/static/js/compilacao_notas.js b/sapl/static/js/compilacao_notas.js old mode 100644 new mode 100755 diff --git a/sapl/static/js/compilacao_view.js b/sapl/static/js/compilacao_view.js old mode 100644 new mode 100755 diff --git a/sapl/static/js/jquery.runner.js b/sapl/static/js/jquery.runner.js old mode 100644 new mode 100755 diff --git a/sapl/static/styles/_header.scss b/sapl/static/styles/_header.scss old mode 100644 new mode 100755 diff --git a/sapl/static/styles/app.scss b/sapl/static/styles/app.scss old mode 100644 new mode 100755 diff --git a/sapl/static/styles/compilacao.scss b/sapl/static/styles/compilacao.scss old mode 100644 new mode 100755 diff --git a/sapl/temp_suppress_crispy_form_warnings.py b/sapl/temp_suppress_crispy_form_warnings.py old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda.html b/sapl/templates/ajuda.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/acessando_alimenta.html b/sapl/templates/ajuda/acessando_alimenta.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/acomp_materia.html b/sapl/templates/ajuda/acomp_materia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/anexos.html b/sapl/templates/ajuda/anexos.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/autor.html b/sapl/templates/ajuda/autor.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/cadastro_comissoes.html b/sapl/templates/ajuda/cadastro_comissoes.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/cadastro_materia.html b/sapl/templates/ajuda/cadastro_materia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/cadastro_mesa_diretora.html b/sapl/templates/ajuda/cadastro_mesa_diretora.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/cadastro_parlamentares.html b/sapl/templates/ajuda/cadastro_parlamentares.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/cargo_comissao.html b/sapl/templates/ajuda/cargo_comissao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/cargo_mesa.html b/sapl/templates/ajuda/cargo_mesa.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/casa_legislativa.html b/sapl/templates/ajuda/casa_legislativa.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/coligacao.html b/sapl/templates/ajuda/coligacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/consultas.html b/sapl/templates/ajuda/consultas.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/dependentes.html b/sapl/templates/ajuda/dependentes.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/despacho_autoria.html b/sapl/templates/ajuda/despacho_autoria.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/envio_proposicao.html b/sapl/templates/ajuda/envio_proposicao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/filiacoes_partidarias.html b/sapl/templates/ajuda/filiacoes_partidarias.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/fim_relatoria.html b/sapl/templates/ajuda/fim_relatoria.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/gerenciamento_usuarios.html b/sapl/templates/ajuda/gerenciamento_usuarios.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/glossario.html b/sapl/templates/ajuda/glossario.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/impressos.html b/sapl/templates/ajuda/impressos.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/legislacao_cita_matanexada.html b/sapl/templates/ajuda/legislacao_cita_matanexada.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/legislatura.html b/sapl/templates/ajuda/legislatura.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/lexml.html b/sapl/templates/ajuda/lexml.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/mandatos_parlamentar.html b/sapl/templates/ajuda/mandatos_parlamentar.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/materia_anexada.html b/sapl/templates/ajuda/materia_anexada.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/modulo_comissoes.html b/sapl/templates/ajuda/modulo_comissoes.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/modulo_mesa_diretora.html b/sapl/templates/ajuda/modulo_mesa_diretora.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/modulo_norma_juridica.html b/sapl/templates/ajuda/modulo_norma_juridica.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/modulo_parlamentares.html b/sapl/templates/ajuda/modulo_parlamentares.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/modulo_tramitacao_materias.html b/sapl/templates/ajuda/modulo_tramitacao_materias.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/nivel_instrucao.html b/sapl/templates/ajuda/nivel_instrucao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/norma_juridica.html b/sapl/templates/ajuda/norma_juridica.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/numeracao_docsacess.html b/sapl/templates/ajuda/numeracao_docsacess.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/ordem_dia.html b/sapl/templates/ajuda/ordem_dia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/orgao.html b/sapl/templates/ajuda/orgao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/origem.html b/sapl/templates/ajuda/origem.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/partidos.html b/sapl/templates/ajuda/partidos.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/periodo_composicao_comissao.html b/sapl/templates/ajuda/periodo_composicao_comissao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/proposicao.html b/sapl/templates/ajuda/proposicao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/proposicao_editor.html b/sapl/templates/ajuda/proposicao_editor.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/proposicao_legislativa.html b/sapl/templates/ajuda/proposicao_legislativa.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/protocolo_administrativo.html b/sapl/templates/ajuda/protocolo_administrativo.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/protocolo_anular.html b/sapl/templates/ajuda/protocolo_anular.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/protocolo_geral.html b/sapl/templates/ajuda/protocolo_geral.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/protocolo_gerar_etiqueta_processo.html b/sapl/templates/ajuda/protocolo_gerar_etiqueta_processo.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/protocolo_gerar_etiqueta_protocolo.html b/sapl/templates/ajuda/protocolo_gerar_etiqueta_protocolo.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/protocolo_legislativo.html b/sapl/templates/ajuda/protocolo_legislativo.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/recebimento_proposicao.html b/sapl/templates/ajuda/recebimento_proposicao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/regime_tramitacao.html b/sapl/templates/ajuda/regime_tramitacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/relatorios.html b/sapl/templates/ajuda/relatorios.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_legislativa.html b/sapl/templates/ajuda/sessao_legislativa.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_plenaria.html b/sapl/templates/ajuda/sessao_plenaria.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_plenaria_ata.html b/sapl/templates/ajuda/sessao_plenaria_ata.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_plenaria_expedientes.html b/sapl/templates/ajuda/sessao_plenaria_expedientes.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_plenaria_lista_presenca_sessao.html b/sapl/templates/ajuda/sessao_plenaria_lista_presenca_sessao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_plenaria_materias_expediente.html b/sapl/templates/ajuda/sessao_plenaria_materias_expediente.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_plenaria_materias_ordem_dia.html b/sapl/templates/ajuda/sessao_plenaria_materias_ordem_dia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_plenaria_mesa.html b/sapl/templates/ajuda/sessao_plenaria_mesa.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_plenaria_oradores.html b/sapl/templates/ajuda/sessao_plenaria_oradores.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_plenaria_oradores_expediente.html b/sapl/templates/ajuda/sessao_plenaria_oradores_expediente.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_plenaria_oradores_explicacoes_pessoais.html b/sapl/templates/ajuda/sessao_plenaria_oradores_explicacoes_pessoais.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_plenaria_presenca_ordem_dia.html b/sapl/templates/ajuda/sessao_plenaria_presenca_ordem_dia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/sessao_plenaria_votacao.html b/sapl/templates/ajuda/sessao_plenaria_votacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/status_tramitacao.html b/sapl/templates/ajuda/status_tramitacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/tipo_afastamento.html b/sapl/templates/ajuda/tipo_afastamento.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/tipo_autor.html b/sapl/templates/ajuda/tipo_autor.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/tipo_comissao.html b/sapl/templates/ajuda/tipo_comissao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/tipo_dependente.html b/sapl/templates/ajuda/tipo_dependente.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/tipo_documento.html b/sapl/templates/ajuda/tipo_documento.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/tipo_materia_legislativa.html b/sapl/templates/ajuda/tipo_materia_legislativa.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/tipo_norma_juridica.html b/sapl/templates/ajuda/tipo_norma_juridica.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/tipo_proposicao.html b/sapl/templates/ajuda/tipo_proposicao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/tipo_sessao_plenaria.html b/sapl/templates/ajuda/tipo_sessao_plenaria.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/tipo_situa_militar.html b/sapl/templates/ajuda/tipo_situa_militar.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/tramitacao_lote.html b/sapl/templates/ajuda/tramitacao_lote.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/tramitacao_relatoria.html b/sapl/templates/ajuda/tramitacao_relatoria.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/troca_senha.html b/sapl/templates/ajuda/troca_senha.html old mode 100644 new mode 100755 diff --git a/sapl/templates/ajuda/unidade_tramitacao.html b/sapl/templates/ajuda/unidade_tramitacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/audiencia/layouts.yaml b/sapl/templates/audiencia/layouts.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/auth/user_form.html b/sapl/templates/auth/user_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/auth/user_list.html b/sapl/templates/auth/user_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base.html b/sapl/templates/base.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/RelatorioAtas_filter.html b/sapl/templates/base/RelatorioAtas_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/RelatorioAudiencia_filter.html b/sapl/templates/base/RelatorioAudiencia_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/RelatorioDataFimPrazoTramitacao_filter.html b/sapl/templates/base/RelatorioDataFimPrazoTramitacao_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/RelatorioHistoricoTramitacao_filter.html b/sapl/templates/base/RelatorioHistoricoTramitacao_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/RelatorioMateriasPorAnoAutorTipo_filter.html b/sapl/templates/base/RelatorioMateriasPorAnoAutorTipo_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/RelatorioMateriasPorAutor_filter.html b/sapl/templates/base/RelatorioMateriasPorAutor_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/RelatorioMateriasPorTramitacao_filter.html b/sapl/templates/base/RelatorioMateriasPorTramitacao_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/RelatorioPresencaSessao_filter.html b/sapl/templates/base/RelatorioPresencaSessao_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/RelatorioReuniao_filter.html b/sapl/templates/base/RelatorioReuniao_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/alterar_senha.html b/sapl/templates/base/alterar_senha.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/autor_form.html b/sapl/templates/base/autor_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/casalegislativa_list.html b/sapl/templates/base/casalegislativa_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/layouts.yaml b/sapl/templates/base/layouts.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/base/login.html b/sapl/templates/base/login.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/nova_senha_form.html b/sapl/templates/base/nova_senha_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/recupera_senha_email_enviado.html b/sapl/templates/base/recupera_senha_email_enviado.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/recuperar_senha_completo.html b/sapl/templates/base/recuperar_senha_completo.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/recuperar_senha_email.html b/sapl/templates/base/recuperar_senha_email.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/recuperar_senha_email_form.html b/sapl/templates/base/recuperar_senha_email_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/relatorios_list.html b/sapl/templates/base/relatorios_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/base/tipoautor_list.html b/sapl/templates/base/tipoautor_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/comissoes/cadastro_reuniao.html b/sapl/templates/comissoes/cadastro_reuniao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/comissoes/cadastro_reuniao_edit.html b/sapl/templates/comissoes/cadastro_reuniao_edit.html old mode 100644 new mode 100755 diff --git a/sapl/templates/comissoes/comissao_parlamentar.html b/sapl/templates/comissoes/comissao_parlamentar.html old mode 100644 new mode 100755 diff --git a/sapl/templates/comissoes/comissao_parlamentar_edit.html b/sapl/templates/comissoes/comissao_parlamentar_edit.html old mode 100644 new mode 100755 diff --git a/sapl/templates/comissoes/composicao_list.html b/sapl/templates/comissoes/composicao_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/comissoes/layouts.yaml b/sapl/templates/comissoes/layouts.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/comissoes/materias.html b/sapl/templates/comissoes/materias.html old mode 100644 new mode 100755 diff --git a/sapl/templates/comissoes/materias_em_tramitacao.html b/sapl/templates/comissoes/materias_em_tramitacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/comissoes/subnav.yaml b/sapl/templates/comissoes/subnav.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/ajax_actions_dinamic_edit.html b/sapl/templates/compilacao/ajax_actions_dinamic_edit.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/ajax_actions_registro_inclusao.html b/sapl/templates/compilacao/ajax_actions_registro_inclusao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/ajax_form.html b/sapl/templates/compilacao/ajax_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/dispositivo_form.html b/sapl/templates/compilacao/dispositivo_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/dispositivo_form_alteracao.html b/sapl/templates/compilacao/dispositivo_form_alteracao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/dispositivo_form_definidor_vigencia.html b/sapl/templates/compilacao/dispositivo_form_definidor_vigencia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/dispositivo_form_edicao_basica.html b/sapl/templates/compilacao/dispositivo_form_edicao_basica.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/dispositivo_form_parents.html b/sapl/templates/compilacao/dispositivo_form_parents.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/dispositivo_form_search.html b/sapl/templates/compilacao/dispositivo_form_search.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/dispositivo_form_search_fragment.html b/sapl/templates/compilacao/dispositivo_form_search_fragment.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/dispositivo_form_vigencia.html b/sapl/templates/compilacao/dispositivo_form_vigencia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/layout/bootstrap_btn_checkbox.html b/sapl/templates/compilacao/layout/bootstrap_btn_checkbox.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/layout/dispositivo_checkbox.html b/sapl/templates/compilacao/layout/dispositivo_checkbox.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/layout/dispositivo_radio.html b/sapl/templates/compilacao/layout/dispositivo_radio.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/layouts.yaml b/sapl/templates/compilacao/layouts.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/publicacao_detail.html b/sapl/templates/compilacao/publicacao_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/publicacao_list.html b/sapl/templates/compilacao/publicacao_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/text_edit.html b/sapl/templates/compilacao/text_edit.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/text_edit_bloco.html b/sapl/templates/compilacao/text_edit_bloco.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/text_edit_blocoalteracao.html b/sapl/templates/compilacao/text_edit_blocoalteracao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/text_list.html b/sapl/templates/compilacao/text_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/text_list__print_version.html b/sapl/templates/compilacao/text_list__print_version.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/text_list_bloco.html b/sapl/templates/compilacao/text_list_bloco.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/text_list_blocoalteracao.html b/sapl/templates/compilacao/text_list_blocoalteracao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/text_notificacoes.html b/sapl/templates/compilacao/text_notificacoes.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/textoarticulado_detail.html b/sapl/templates/compilacao/textoarticulado_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/textoarticulado_list.html b/sapl/templates/compilacao/textoarticulado_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/textoarticulado_menu_config.html b/sapl/templates/compilacao/textoarticulado_menu_config.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/tipotextoarticulado_detail.html b/sapl/templates/compilacao/tipotextoarticulado_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/compilacao/tipotextoarticulado_list.html b/sapl/templates/compilacao/tipotextoarticulado_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/crud/ajax_form.html b/sapl/templates/crud/ajax_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/crud/confirm_delete.html b/sapl/templates/crud/confirm_delete.html old mode 100644 new mode 100755 diff --git a/sapl/templates/crud/detail.html b/sapl/templates/crud/detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/crud/detail_detail.html b/sapl/templates/crud/detail_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/crud/form.html b/sapl/templates/crud/form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/crud/list.html b/sapl/templates/crud/list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/crud/list_tabaux.html b/sapl/templates/crud/list_tabaux.html old mode 100644 new mode 100755 diff --git a/sapl/templates/email/acompanhar.html b/sapl/templates/email/acompanhar.html old mode 100644 new mode 100755 diff --git a/sapl/templates/email/acompanhar.txt b/sapl/templates/email/acompanhar.txt old mode 100644 new mode 100755 diff --git a/sapl/templates/email/confirma.html b/sapl/templates/email/confirma.html old mode 100644 new mode 100755 diff --git a/sapl/templates/email/test_tramitacao.html b/sapl/templates/email/test_tramitacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/email/tramitacao.html b/sapl/templates/email/tramitacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/email/tramitacao.txt b/sapl/templates/email/tramitacao.txt old mode 100644 new mode 100755 diff --git a/sapl/templates/floppyforms/image_thumbnail.html b/sapl/templates/floppyforms/image_thumbnail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/index.html b/sapl/templates/index.html old mode 100644 new mode 100755 diff --git a/sapl/templates/lexml/layouts.yaml b/sapl/templates/lexml/layouts.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/acompanhamento_materia.html b/sapl/templates/materia/acompanhamento_materia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/adicionar_varias_autorias.html b/sapl/templates/materia/adicionar_varias_autorias.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/autoria_form.html b/sapl/templates/materia/autoria_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/autoria_list.html b/sapl/templates/materia/autoria_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/autoria_multicreate_form.html b/sapl/templates/materia/autoria_multicreate_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/confirmar_proposicao.html b/sapl/templates/materia/confirmar_proposicao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/documentoacessorio_form.html b/sapl/templates/materia/documentoacessorio_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/em_lote/acessorio.html b/sapl/templates/materia/em_lote/acessorio.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/em_lote/excluir_tramitacao.html b/sapl/templates/materia/em_lote/excluir_tramitacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/em_lote/subnav_em_lote.yaml b/sapl/templates/materia/em_lote/subnav_em_lote.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/em_lote/tramitacao.html b/sapl/templates/materia/em_lote/tramitacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/formulario_simplificado.html b/sapl/templates/materia/formulario_simplificado.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/impressos/etiqueta.html b/sapl/templates/materia/impressos/etiqueta.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/impressos/etiqueta_pdf.html b/sapl/templates/materia/impressos/etiqueta_pdf.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/impressos/ficha.html b/sapl/templates/materia/impressos/ficha.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/impressos/ficha_pdf.html b/sapl/templates/materia/impressos/ficha_pdf.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/impressos/ficha_seleciona.html b/sapl/templates/materia/impressos/ficha_seleciona.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/impressos/impressos.html b/sapl/templates/materia/impressos/impressos.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/impressos/norma.html b/sapl/templates/materia/impressos/norma.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/impressos/normas_pdf.html b/sapl/templates/materia/impressos/normas_pdf.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/impressos/pdf.html b/sapl/templates/materia/impressos/pdf.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/layouts.yaml b/sapl/templates/materia/layouts.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/materialegislativa_detail.html b/sapl/templates/materia/materialegislativa_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/materialegislativa_filter.html b/sapl/templates/materia/materialegislativa_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/materialegislativa_form.html b/sapl/templates/materia/materialegislativa_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/materialegislativa_list.html b/sapl/templates/materia/materialegislativa_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/prop_devolvidas_list.html b/sapl/templates/materia/prop_devolvidas_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/prop_pendentes_list.html b/sapl/templates/materia/prop_pendentes_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/prop_recebidas_list.html b/sapl/templates/materia/prop_recebidas_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/proposicao_confirm_delete.html b/sapl/templates/materia/proposicao_confirm_delete.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/proposicao_confirm_return.html b/sapl/templates/materia/proposicao_confirm_return.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/proposicao_detail.html b/sapl/templates/materia/proposicao_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/proposicao_form.html b/sapl/templates/materia/proposicao_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/recibo_proposicao.html b/sapl/templates/materia/recibo_proposicao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/relatoria_form.html b/sapl/templates/materia/relatoria_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/resumo_detail_materia.html b/sapl/templates/materia/resumo_detail_materia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/subnav.yaml b/sapl/templates/materia/subnav.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/subnav_prop.yaml b/sapl/templates/materia/subnav_prop.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/tipoproposicao_form.html b/sapl/templates/materia/tipoproposicao_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/materia/tramitacao_form.html b/sapl/templates/materia/tramitacao_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/menu_tabelas_auxiliares.yaml b/sapl/templates/menu_tabelas_auxiliares.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/menus/menu.html b/sapl/templates/menus/menu.html old mode 100644 new mode 100755 diff --git a/sapl/templates/menus/nav.html b/sapl/templates/menus/nav.html old mode 100644 new mode 100755 diff --git a/sapl/templates/menus/subnav.html b/sapl/templates/menus/subnav.html old mode 100644 new mode 100755 diff --git a/sapl/templates/navbar.yaml b/sapl/templates/navbar.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/norma/layouts.yaml b/sapl/templates/norma/layouts.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/norma/normajuridica_detail.html b/sapl/templates/norma/normajuridica_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/norma/normajuridica_filter.html b/sapl/templates/norma/normajuridica_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/norma/normajuridica_form.html b/sapl/templates/norma/normajuridica_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/norma/normarelacionada_form.html b/sapl/templates/norma/normarelacionada_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/norma/subnav.yaml b/sapl/templates/norma/subnav.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/paginacao.html b/sapl/templates/paginacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/painel/index.html b/sapl/templates/painel/index.html old mode 100644 new mode 100755 diff --git a/sapl/templates/painel/layouts.yaml b/sapl/templates/painel/layouts.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/painel/mensagem.html b/sapl/templates/painel/mensagem.html old mode 100644 new mode 100755 diff --git a/sapl/templates/painel/parlamentares.html b/sapl/templates/painel/parlamentares.html old mode 100644 new mode 100755 diff --git a/sapl/templates/painel/votacao.html b/sapl/templates/painel/votacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/painel/voto_nominal.html b/sapl/templates/painel/voto_nominal.html old mode 100644 new mode 100755 diff --git a/sapl/templates/parlamentares/composicaomesa_form.html b/sapl/templates/parlamentares/composicaomesa_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/parlamentares/frente_form.html b/sapl/templates/parlamentares/frente_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/parlamentares/layouts.yaml b/sapl/templates/parlamentares/layouts.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/parlamentares/materias.html b/sapl/templates/parlamentares/materias.html old mode 100644 new mode 100755 diff --git a/sapl/templates/parlamentares/parlamentar_perfil_publico.html b/sapl/templates/parlamentares/parlamentar_perfil_publico.html old mode 100644 new mode 100755 diff --git a/sapl/templates/parlamentares/parlamentares_list.html b/sapl/templates/parlamentares/parlamentares_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/parlamentares/public_composicaomesa_form.html b/sapl/templates/parlamentares/public_composicaomesa_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/parlamentares/subnav.yaml b/sapl/templates/parlamentares/subnav.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/parlamentares/subnav_coligacao.yaml b/sapl/templates/parlamentares/subnav_coligacao.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/parlamentares/votante_list.html b/sapl/templates/parlamentares/votante_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/MateriaTemplate.html b/sapl/templates/protocoloadm/MateriaTemplate.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/anular_protocoloadm.html b/sapl/templates/protocoloadm/anular_protocoloadm.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/comprovante.html b/sapl/templates/protocoloadm/comprovante.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/criar_documento.html b/sapl/templates/protocoloadm/criar_documento.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/detail_doc_adm.html b/sapl/templates/protocoloadm/detail_doc_adm.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/detail_doc_detail.html b/sapl/templates/protocoloadm/detail_doc_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/documento_acessorio_administrativo.html b/sapl/templates/protocoloadm/documento_acessorio_administrativo.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/documento_acessorio_administrativo_edit.html b/sapl/templates/protocoloadm/documento_acessorio_administrativo_edit.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/documentoadministrativo_filter.html b/sapl/templates/protocoloadm/documentoadministrativo_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/documentoadministrativo_form.html b/sapl/templates/protocoloadm/documentoadministrativo_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/layouts.yaml b/sapl/templates/protocoloadm/layouts.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/pesquisa_documento_detail.html b/sapl/templates/protocoloadm/pesquisa_documento_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/proposicao_receber.html b/sapl/templates/protocoloadm/proposicao_receber.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/proposicao_view.html b/sapl/templates/protocoloadm/proposicao_view.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/proposicoes.html b/sapl/templates/protocoloadm/proposicoes.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/proposicoes_detail.html b/sapl/templates/protocoloadm/proposicoes_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/proposicoes_incorporadas.html b/sapl/templates/protocoloadm/proposicoes_incorporadas.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/proposicoes_naoincorporadas.html b/sapl/templates/protocoloadm/proposicoes_naoincorporadas.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/proposicoes_naorecebidas.html b/sapl/templates/protocoloadm/proposicoes_naorecebidas.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/protocolar_documento.html b/sapl/templates/protocoloadm/protocolar_documento.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/protocolar_materia.html b/sapl/templates/protocoloadm/protocolar_materia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/protocolo_filter.html b/sapl/templates/protocoloadm/protocolo_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/protocolo_list.html b/sapl/templates/protocoloadm/protocolo_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/protocolo_mostrar.html b/sapl/templates/protocoloadm/protocolo_mostrar.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/protocoloadm_detail.html b/sapl/templates/protocoloadm/protocoloadm_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/subnav.yaml b/sapl/templates/protocoloadm/subnav.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/tramitacaoadministrativo_detail.html b/sapl/templates/protocoloadm/tramitacaoadministrativo_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/protocoloadm/tramitacaoadministrativo_form.html b/sapl/templates/protocoloadm/tramitacaoadministrativo_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/rest_framework_docs/base.html b/sapl/templates/rest_framework_docs/base.html old mode 100644 new mode 100755 diff --git a/sapl/templates/rest_framework_docs/home.html b/sapl/templates/rest_framework_docs/home.html old mode 100644 new mode 100755 diff --git a/sapl/templates/search/indexes/materia/documentoacessorio_text.txt b/sapl/templates/search/indexes/materia/documentoacessorio_text.txt old mode 100644 new mode 100755 diff --git a/sapl/templates/search/indexes/materia/materialegislativa_text.txt b/sapl/templates/search/indexes/materia/materialegislativa_text.txt old mode 100644 new mode 100755 diff --git a/sapl/templates/search/indexes/norma/normajuridica_text.txt b/sapl/templates/search/indexes/norma/normajuridica_text.txt old mode 100644 new mode 100755 diff --git a/sapl/templates/search/search.html b/sapl/templates/search/search.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/adicionar_varias_materias_expediente.html b/sapl/templates/sessao/adicionar_varias_materias_expediente.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/adicionar_varias_materias_ordem.html b/sapl/templates/sessao/adicionar_varias_materias_ordem.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_ata/assinaturas.html b/sapl/templates/sessao/blocos_ata/assinaturas.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_ata/conteudo_multimidia.html b/sapl/templates/sessao/blocos_ata/conteudo_multimidia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_ata/expedientes.html b/sapl/templates/sessao/blocos_ata/expedientes.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_ata/identificacao_basica.html b/sapl/templates/sessao/blocos_ata/identificacao_basica.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_ata/lista_presenca.html b/sapl/templates/sessao/blocos_ata/lista_presenca.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_ata/lista_presenca_ordem_dia.html b/sapl/templates/sessao/blocos_ata/lista_presenca_ordem_dia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_ata/materias_expediente.html b/sapl/templates/sessao/blocos_ata/materias_expediente.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_ata/materias_ordem_dia.html b/sapl/templates/sessao/blocos_ata/materias_ordem_dia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_ata/mesa_diretora.html b/sapl/templates/sessao/blocos_ata/mesa_diretora.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_ata/ocorrencias_da_sessao.html b/sapl/templates/sessao/blocos_ata/ocorrencias_da_sessao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_ata/oradores_expediente.html b/sapl/templates/sessao/blocos_ata/oradores_expediente.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_ata/oradores_explicacoes.html b/sapl/templates/sessao/blocos_ata/oradores_explicacoes.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_resumo/conteudo_multimidia.html b/sapl/templates/sessao/blocos_resumo/conteudo_multimidia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_resumo/expedientes.html b/sapl/templates/sessao/blocos_resumo/expedientes.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_resumo/identificacao_basica.html b/sapl/templates/sessao/blocos_resumo/identificacao_basica.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_resumo/lista_presenca.html b/sapl/templates/sessao/blocos_resumo/lista_presenca.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_resumo/lista_presenca_ordem_dia.html b/sapl/templates/sessao/blocos_resumo/lista_presenca_ordem_dia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_resumo/materias_expediente.html b/sapl/templates/sessao/blocos_resumo/materias_expediente.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_resumo/materias_ordem_dia.html b/sapl/templates/sessao/blocos_resumo/materias_ordem_dia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_resumo/mesa_diretora.html b/sapl/templates/sessao/blocos_resumo/mesa_diretora.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_resumo/ocorrencias_da_sessao.html b/sapl/templates/sessao/blocos_resumo/ocorrencias_da_sessao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_resumo/oradores_expediente.html b/sapl/templates/sessao/blocos_resumo/oradores_expediente.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/blocos_resumo/oradores_explicacoes.html b/sapl/templates/sessao/blocos_resumo/oradores_explicacoes.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/expediente.html b/sapl/templates/sessao/expediente.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/expedientemateria_form.html b/sapl/templates/sessao/expedientemateria_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/expedientemateria_list.html b/sapl/templates/sessao/expedientemateria_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/layouts.yaml b/sapl/templates/sessao/layouts.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/mesa.html b/sapl/templates/sessao/mesa.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/ocorrencia_sessao.html b/sapl/templates/sessao/ocorrencia_sessao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/ordemdia_form.html b/sapl/templates/sessao/ordemdia_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/ordemdia_list.html b/sapl/templates/sessao/ordemdia_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/painel.html b/sapl/templates/sessao/painel.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/pauta_inexistente.html b/sapl/templates/sessao/pauta_inexistente.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/pauta_sessao_detail.html b/sapl/templates/sessao/pauta_sessao_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/pauta_sessao_filter.html b/sapl/templates/sessao/pauta_sessao_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/pauta_sessao_list.html b/sapl/templates/sessao/pauta_sessao_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/pauta_subnav.yaml b/sapl/templates/sessao/pauta_subnav.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/presenca.html b/sapl/templates/sessao/presenca.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/presenca_ordemdia.html b/sapl/templates/sessao/presenca_ordemdia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/resumo.html b/sapl/templates/sessao/resumo.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/resumo_ata.html b/sapl/templates/sessao/resumo_ata.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/resumo_ordenacao.html b/sapl/templates/sessao/resumo_ordenacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/sessaoplenaria_filter.html b/sapl/templates/sessao/sessaoplenaria_filter.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/sessaoplenaria_form.html b/sapl/templates/sessao/sessaoplenaria_form.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/sessaoplenaria_list.html b/sapl/templates/sessao/sessaoplenaria_list.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/subnav.yaml b/sapl/templates/sessao/subnav.yaml old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/votacao/nominal.html b/sapl/templates/sessao/votacao/nominal.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/votacao/nominal_detail.html b/sapl/templates/sessao/votacao/nominal_detail.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/votacao/nominal_edit.html b/sapl/templates/sessao/votacao/nominal_edit.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/votacao/nominal_transparencia.html b/sapl/templates/sessao/votacao/nominal_transparencia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/votacao/simbolica_transparencia.html b/sapl/templates/sessao/votacao/simbolica_transparencia.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/votacao/votacao.html b/sapl/templates/sessao/votacao/votacao.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sessao/votacao/votacao_edit.html b/sapl/templates/sessao/votacao/votacao_edit.html old mode 100644 new mode 100755 diff --git a/sapl/templates/sistema.html b/sapl/templates/sistema.html old mode 100644 new mode 100755 diff --git a/sapl/test_crispy_layout_mixin.py b/sapl/test_crispy_layout_mixin.py old mode 100644 new mode 100755 diff --git a/sapl/test_general.py b/sapl/test_general.py old mode 100644 new mode 100755 diff --git a/sapl/test_urls.py b/sapl/test_urls.py old mode 100644 new mode 100755 diff --git a/sapl/test_utils.py b/sapl/test_utils.py old mode 100644 new mode 100755 diff --git a/sapl/urls.py b/sapl/urls.py old mode 100644 new mode 100755 diff --git a/sapl/utils.py b/sapl/utils.py old mode 100644 new mode 100755 diff --git a/sapl/wsgi.py b/sapl/wsgi.py old mode 100644 new mode 100755 diff --git a/scripts/anonimizador/anon.py b/scripts/anonimizador/anon.py old mode 100644 new mode 100755 diff --git a/scripts/anonimizador/nomes.txt b/scripts/anonimizador/nomes.txt old mode 100644 new mode 100755 diff --git a/scripts/anonimizador/paragrafos.txt b/scripts/anonimizador/paragrafos.txt old mode 100644 new mode 100755 diff --git a/scripts/convert_null_to_empty_in_all_char_fields.py b/scripts/convert_null_to_empty_in_all_char_fields.py old mode 100644 new mode 100755 diff --git a/scripts/fk_protocoloadm_docadm.py b/scripts/fk_protocoloadm_docadm.py old mode 100644 new mode 100755 diff --git a/scripts/hooks/pre-commit b/scripts/hooks/pre-commit old mode 100644 new mode 100755 diff --git a/scripts/id_numero_legislatura.py b/scripts/id_numero_legislatura.py old mode 100644 new mode 100755 diff --git a/scripts/legacy_db_checks.sql b/scripts/legacy_db_checks.sql old mode 100644 new mode 100755 diff --git a/scripts/lista_permissions_in_decorators.py b/scripts/lista_permissions_in_decorators.py old mode 100644 new mode 100755 diff --git a/scripts/lista_urls.py b/scripts/lista_urls.py old mode 100644 new mode 100755 diff --git a/scripts/redbaron.py b/scripts/redbaron.py old mode 100644 new mode 100755 diff --git a/scripts/set_inicio_mandato.py b/scripts/set_inicio_mandato.py old mode 100644 new mode 100755 diff --git a/scripts/voto_parlamentar.sql b/scripts/voto_parlamentar.sql old mode 100644 new mode 100755 diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 diff --git a/test_hashers.py b/test_hashers.py old mode 100644 new mode 100755 From 659bec984a5144d59c4a8c7f43520330998ca8e6 Mon Sep 17 00:00:00 2001 From: AndreSouto Date: Wed, 10 Oct 2018 15:35:01 -0300 Subject: [PATCH 05/20] =?UTF-8?q?Mudan=C3=A7as=20no=20arquivo=20settings?= =?UTF-8?q?=20para=20uso=20de=20Log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/sessao/views.py | 6 ++- sapl/settings.py | 87 +++++++++++++++++++++++++++++++++----------- 2 files changed, 70 insertions(+), 23 deletions(-) diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index 1b87c0a26..3fa0d29f8 100755 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -1,4 +1,5 @@ from operator import itemgetter +import logging from re import sub from django.contrib import messages @@ -17,7 +18,7 @@ from django.utils.html import strip_tags from django.utils.translation import ugettext_lazy as _ from django.views.decorators.csrf import csrf_exempt from django.views.generic import FormView, ListView, TemplateView, CreateView, UpdateView -from django.views.generic.base import RedirectView +from django.views.generic.base import RedirectView, logger from django.views.generic.detail import DetailView from django.views.generic.edit import FormMixin from django_filters.views import FilterView @@ -1557,6 +1558,8 @@ class OcorrenciaSessaoView(FormMixin, DetailView): form_class = OcorrenciaSessaoForm model = SessaoPlenaria + logger = logging.getLogger(__name__) + def delete(self): OcorrenciaSessao.objects.filter(sessao_plenaria=self.object).delete() @@ -1573,6 +1576,7 @@ class OcorrenciaSessaoView(FormMixin, DetailView): ocorrencia.conteudo = conteudo ocorrencia.save() + logger.warning('TESTANDO LOG TESTANDO') msg = _('Registro salvo com sucesso') messages.add_message(self.request, messages.SUCCESS, msg) diff --git a/sapl/settings.py b/sapl/settings.py index 12865c501..8fadacbce 100755 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -296,30 +296,73 @@ FILTERS_HELP_TEXT_FILTER = False # FIXME update cripy-forms and remove this # hack to suppress many annoying warnings from crispy_forms # see sapl.temp_suppress_crispy_form_warnings -LOGGING = SUPRESS_CRISPY_FORM_WARNINGS_LOGGING - - -LOGGING_CONSOLE = config('LOGGING_CONSOLE', default=False, cast=bool) -if DEBUG and LOGGING_CONSOLE: - # Descomentar linha abaixo fará com que logs aparecam, inclusive SQL - # LOGGING['handlers']['console']['level'] = 'DEBUG' - LOGGING['loggers']['django']['level'] = 'DEBUG' - LOGGING.update({ - 'formatters': { - 'verbose': { - 'format': '%(levelname)s %(asctime)s %(pathname)s ' - '%(funcName)s %(message)s' - }, - 'simple': { - 'format': '%(levelname)s %(message)s' - }, +# LOGGING = SUPRESS_CRISPY_FORM_WARNINGS_LOGGING +# +# +# LOGGING_CONSOLE = config('LOGGING_CONSOLE', default=False, cast=bool) +# if DEBUG and LOGGING_CONSOLE: +# # Descomentar linha abaixo fará com que logs aparecam, inclusive SQL +# # LOGGING['handlers']['console']['level'] = 'DEBUG' +# LOGGING['loggers']['django']['level'] = 'DEBUG' +# LOGGING.update({ +# 'formatters': { +# 'verbose': { +# 'format': '%(levelname)s %(asctime)s %(pathname)s ' +# '%(funcName)s %(message)s' +# }, +# 'simple': { +# 'format': '%(levelname)s %(message)s' +# }, +# }, +# }) +# LOGGING['handlers']['console']['formatter'] = 'verbose' +# LOGGING['loggers'][BASE_DIR.name] = { +# 'handlers': ['console'], +# 'level': 'DEBUG', +# } +# LOGGING['loggers']['APPNAME']['handlers'] = ['file'], +# LOGGING['loggers']['APPNAME']['level'] = 'DEBUG' + +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'formatters': { + 'verbose': { + 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' + }, + 'simple': { + 'format': '%(levelname)s %(asctime)s %(message)s' + }, + }, + 'filters': { + # TODO Ver depois ! + 'require_debug_false': { + '()': 'django.utils.log.RequireDebugFalse' + } + }, + 'handlers': { + 'console': { + 'level': 'DEBUG', + 'class': 'logging.StreamHandler', + 'formatter': 'simple', + }, + 'applogfile': { + 'level':'DEBUG', + 'class':'logging.handlers.RotatingFileHandler', + 'filename': 'APPNAME.log', + 'maxBytes': 1024*1024*15, # 15MB + 'backupCount': 10, + 'formatter': 'simple', + }, + }, + 'loggers': { + 'django.request': { + 'handlers': ['applogfile'], + 'level': 'DEBUG', + 'propagate': True, }, - }) - LOGGING['handlers']['console']['formatter'] = 'verbose' - LOGGING['loggers'][BASE_DIR.name] = { - 'handlers': ['console'], - 'level': 'DEBUG', } +} def excepthook(*args): From 208c5058ca50869162bd82a4f6f31fae32cecf4d Mon Sep 17 00:00:00 2001 From: AndreSouto Date: Thu, 11 Oct 2018 14:29:49 -0300 Subject: [PATCH 06/20] Loggers inseridos em sessao/views.py --- sapl/sessao/views.py | 48 ++++++++++++++++++++++++++++++++++++++++++-- sapl/settings.py | 43 ++++++--------------------------------- 2 files changed, 52 insertions(+), 39 deletions(-) diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index 3fa0d29f8..9bc2ee8fb 100755 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -63,10 +63,11 @@ TipoResultadoVotacaoCrud = CrudAux.build( def reordernar_materias_expediente(request, pk): expedientes = ExpedienteMateria.objects.filter( sessao_plenaria_id=pk) + logger = logging.getLogger('reordenar.materias.expediente') + for exp_num, e in enumerate(expedientes, 1): e.numero_ordem = exp_num e.save() - return HttpResponseRedirect( reverse('sapl.sessao:expedientemateria_list', kwargs={'pk': pk})) @@ -1087,6 +1088,7 @@ def insere_parlamentar_composicao(request): Esta função lida com qualquer operação de inserção na composição da Mesa Diretora """ + if request.user.has_perm( '%s.add_%s' % ( AppConfig.label, IntegranteMesa._meta.model_name)): @@ -1471,6 +1473,8 @@ class ResumoView(DetailView): class ResumoAtaView(ResumoView): template_name = 'sessao/resumo_ata.html' + logger = logging.getLogger(__name__) + logger.info('- Gerando Resumo.') class ExpedienteView(FormMixin, DetailView): @@ -1478,6 +1482,8 @@ class ExpedienteView(FormMixin, DetailView): form_class = ExpedienteForm model = SessaoPlenaria + logger = logging.getLogger(__name__) + def get_context_data(self, **kwargs): context = FormMixin.get_context_data(self, **kwargs) context['title'] = '%s (%s)' % ( @@ -1492,6 +1498,7 @@ class ExpedienteView(FormMixin, DetailView): if 'apagar-expediente' in request.POST: ExpedienteSessao.objects.filter( sessao_plenaria_id=self.object.id).delete() + logger.info('- Expediente deletado.') return self.form_valid(form) if form.is_valid(): @@ -1512,6 +1519,8 @@ class ExpedienteView(FormMixin, DetailView): msg = _('Registro salvo com sucesso') messages.add_message(self.request, messages.SUCCESS, msg) + logger.info('- Expediente salvo.') + return self.form_valid(form) else: msg = _('Erro ao salvar registro') @@ -1566,6 +1575,8 @@ class OcorrenciaSessaoView(FormMixin, DetailView): msg = _('Registro deletado com sucesso') messages.add_message(self.request, messages.SUCCESS, msg) + logger.info('- Ocorrência de Sessão deletada.') + def save(self,form): conteudo = form.cleaned_data['conteudo'] @@ -1576,10 +1587,11 @@ class OcorrenciaSessaoView(FormMixin, DetailView): ocorrencia.conteudo = conteudo ocorrencia.save() - logger.warning('TESTANDO LOG TESTANDO') msg = _('Registro salvo com sucesso') messages.add_message(self.request, messages.SUCCESS, msg) + logger.info('- Ocorrência de Sessão atualizada.') + @method_decorator(permission_required('sessao.add_ocorrenciasessao')) def post(self, request, *args, **kwargs): self.object = self.get_object() @@ -1681,6 +1693,8 @@ class VotacaoView(SessaoPermissionMixin): template_name = 'sessao/votacao/votacao.html' form_class = VotacaoForm + logger = logging.getLogger(__name__) + def get(self, request, *args, **kwargs): self.object = self.get_object() context = self.get_context_data(object=self.object) @@ -1766,6 +1780,7 @@ class VotacaoView(SessaoPermissionMixin): request.POST['resultado_votacao']) votacao.save() except: + logger.error('- Problemas ao salvar registro de votação.') return self.form_invalid(form) else: ordem = OrdemDia.objects.get( @@ -1813,18 +1828,22 @@ class VotacaoNominalAbstract(SessaoPermissionMixin): expediente = None form_class = VotacaoNominalForm + logger = logging.getLogger(__name__) + def get(self, request, *args, **kwargs): if self.ordem: ordem_id = kwargs['oid'] if RegistroVotacao.objects.filter(ordem_id=ordem_id).exists(): msg = _('Esta matéria já foi votada!') messages.add_message(request, messages.ERROR, msg) + logger.info('- Matéria já votada!') return HttpResponseRedirect(reverse( 'sapl.sessao:ordemdia_list', kwargs={'pk': kwargs['pk']})) try: ordem = OrdemDia.objects.get(id=ordem_id) except ObjectDoesNotExist: + logger.error('- Objeto Ordem Dia não existe.') raise Http404() presentes = PresencaOrdemDia.objects.filter( @@ -1855,6 +1874,7 @@ class VotacaoNominalAbstract(SessaoPermissionMixin): try: expediente = ExpedienteMateria.objects.get(id=expediente_id) except ObjectDoesNotExist: + logger.error('- Objeto Expediente Matéria não existe.') raise Http404() presentes = SessaoPlenariaPresenca.objects.filter( @@ -1893,6 +1913,7 @@ class VotacaoNominalAbstract(SessaoPermissionMixin): try: materia_votacao = OrdemDia.objects.get(id=ordem_id) except ObjectDoesNotExist: + logger.error('- Objeto Matéria Votação não existe.') raise Http404() elif self.expediente: expediente_id = kwargs['oid'] @@ -1900,6 +1921,7 @@ class VotacaoNominalAbstract(SessaoPermissionMixin): materia_votacao = ExpedienteMateria.objects.get( id=expediente_id) except ObjectDoesNotExist: + logger.error('- Objeto Matéria Votação não existe.') raise Http404() if 'cancelar-votacao' in request.POST: @@ -2038,6 +2060,7 @@ class VotacaoNominalAbstract(SessaoPermissionMixin): voto = voto_parlamentar.get( parlamentar=parlamentar) except ObjectDoesNotExist: + logger.error('- Objeto Voto não existe.') yield [parlamentar, None] else: yield [parlamentar, voto.voto] @@ -2056,6 +2079,8 @@ class VotacaoNominalAbstract(SessaoPermissionMixin): class VotacaoNominalEditAbstract(SessaoPermissionMixin): template_name = 'sessao/votacao/nominal_edit.html' + logger = logging.getLogger(__name__) + def get(self, request, *args, **kwargs): context = {} @@ -2066,6 +2091,7 @@ class VotacaoNominalEditAbstract(SessaoPermissionMixin): votacao = RegistroVotacao.objects.filter(ordem_id=ordem_id).last() if not ordem or not votacao: + logger.error('- Objeto Ordem Dia ou Votação não existe.') raise Http404() materia = ordem.materia @@ -2080,6 +2106,7 @@ class VotacaoNominalEditAbstract(SessaoPermissionMixin): expediente_id=expediente_id).last() if not expediente or not votacao: + logger.error('- Objeto Expediente ou Votação não existe.') raise Http404() materia = expediente.materia @@ -2135,6 +2162,7 @@ class VotacaoNominalEditAbstract(SessaoPermissionMixin): try: materia_votacao = OrdemDia.objects.get(id=ordem_id) except ObjectDoesNotExist: + logger.error('- Objeto Ordem Dia não existe.') raise Http404() elif self.expediente: @@ -2144,6 +2172,7 @@ class VotacaoNominalEditAbstract(SessaoPermissionMixin): materia_votacao = ExpedienteMateria.objects.get( id=expediente_id) except ObjectDoesNotExist: + logger.error('- Objeto Matéria Expediente não existe.') raise Http404() if(int(request.POST['anular_votacao']) == 1): @@ -2675,6 +2704,8 @@ class PesquisarSessaoPlenariaView(FilterView): filterset_class = SessaoPlenariaFilterSet paginate_by = 10 + logger = logging.getLogger(__name__) + def get_filterset_kwargs(self, filterset_class): super(PesquisarSessaoPlenariaView, self).get_filterset_kwargs(filterset_class) @@ -2730,6 +2761,8 @@ class PesquisarSessaoPlenariaView(FilterView): context['show_results'] = show_results_filter_set( self.request.GET.copy()) + logger.info(' - Pesquisa de Sessões Plenárias.') + return self.render_to_response(context) @@ -2737,6 +2770,9 @@ class PesquisarPautaSessaoView(PesquisarSessaoPlenariaView): filterset_class = PautaSessaoFilterSet template_name = 'sessao/pauta_sessao_filter.html' + logger = logging.getLogger(__name__) + logger.info(' - Pesquisa de Pauta de Sessão.') + def get_context_data(self, **kwargs): context = super(PesquisarPautaSessaoView, self).get_context_data(**kwargs) @@ -2757,6 +2793,8 @@ class AdicionarVariasMateriasExpediente(PermissionRequiredForAppCrudMixin, template_name = 'sessao/adicionar_varias_materias_expediente.html' app_label = AppConfig.label + logger = logging.getLogger(__name__) + def get_filterset_kwargs(self, filterset_class): super(AdicionarVariasMateriasExpediente, self).get_filterset_kwargs(filterset_class) @@ -2806,11 +2844,13 @@ class AdicionarVariasMateriasExpediente(PermissionRequiredForAppCrudMixin, msg = _('%s adicionado(a) com sucesso!' % MateriaLegislativa.objects.get(id=m)) messages.add_message(request, messages.SUCCESS, msg) + logger.info(msg) except MultiValueDictKeyError: msg = _('Formulário Inválido. Você esqueceu de selecionar ' + 'o tipo de votação de %s' % MateriaLegislativa.objects.get(id=m)) messages.add_message(request, messages.ERROR, msg) + logger.info(msg) return self.get(request, self.kwargs) if tipo_votacao: @@ -2845,6 +2885,8 @@ class AdicionarVariasMateriasOrdemDia(AdicionarVariasMateriasExpediente): filterset_class = AdicionarVariasMateriasFilterSet template_name = 'sessao/adicionar_varias_materias_ordem.html' + logger = logging.getLogger(__name__) + def get_filterset_kwargs(self, filterset_class): super(AdicionarVariasMateriasExpediente, self).get_filterset_kwargs(filterset_class) @@ -2878,11 +2920,13 @@ class AdicionarVariasMateriasOrdemDia(AdicionarVariasMateriasExpediente): msg = _('%s adicionado(a) com sucesso!' % MateriaLegislativa.objects.get(id=m)) messages.add_message(request, messages.SUCCESS, msg) + logger.info(msg) except MultiValueDictKeyError: msg = _('Formulário Inválido. Você esqueceu de selecionar ' + 'o tipo de votação de %s' % MateriaLegislativa.objects.get(id=m)) messages.add_message(request, messages.ERROR, msg) + logger.info(msg) return self.get(request, self.kwargs) if tipo_votacao: diff --git a/sapl/settings.py b/sapl/settings.py index 8fadacbce..7a3aba0be 100755 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -292,43 +292,12 @@ SASS_PROCESSOR_INCLUDE_DIRS = (BOWER_COMPONENTS_ROOT.child( # suprime texto de ajuda default do django-filter FILTERS_HELP_TEXT_FILTER = False - -# FIXME update cripy-forms and remove this -# hack to suppress many annoying warnings from crispy_forms -# see sapl.temp_suppress_crispy_form_warnings -# LOGGING = SUPRESS_CRISPY_FORM_WARNINGS_LOGGING -# -# -# LOGGING_CONSOLE = config('LOGGING_CONSOLE', default=False, cast=bool) -# if DEBUG and LOGGING_CONSOLE: -# # Descomentar linha abaixo fará com que logs aparecam, inclusive SQL -# # LOGGING['handlers']['console']['level'] = 'DEBUG' -# LOGGING['loggers']['django']['level'] = 'DEBUG' -# LOGGING.update({ -# 'formatters': { -# 'verbose': { -# 'format': '%(levelname)s %(asctime)s %(pathname)s ' -# '%(funcName)s %(message)s' -# }, -# 'simple': { -# 'format': '%(levelname)s %(message)s' -# }, -# }, -# }) -# LOGGING['handlers']['console']['formatter'] = 'verbose' -# LOGGING['loggers'][BASE_DIR.name] = { -# 'handlers': ['console'], -# 'level': 'DEBUG', -# } -# LOGGING['loggers']['APPNAME']['handlers'] = ['file'], -# LOGGING['loggers']['APPNAME']['level'] = 'DEBUG' - LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { - 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' + 'format': '%(levelname)s %(asctime)s %(filename)s %(funcName)s %(lineno)d %(name)s %(message)s' }, 'simple': { 'format': '%(levelname)s %(asctime)s %(message)s' @@ -342,23 +311,23 @@ LOGGING = { }, 'handlers': { 'console': { - 'level': 'DEBUG', + 'level': 'INFO', 'class': 'logging.StreamHandler', 'formatter': 'simple', }, 'applogfile': { - 'level':'DEBUG', + 'level':'INFO', 'class':'logging.handlers.RotatingFileHandler', - 'filename': 'APPNAME.log', + 'filename': 'SAPL.log', 'maxBytes': 1024*1024*15, # 15MB 'backupCount': 10, - 'formatter': 'simple', + 'formatter': 'verbose', }, }, 'loggers': { 'django.request': { 'handlers': ['applogfile'], - 'level': 'DEBUG', + 'level': 'INFO', 'propagate': True, }, } From 5fd1c09206e94d980bcb9754ed76a8028b4239b7 Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Thu, 11 Oct 2018 15:00:38 -0300 Subject: [PATCH 07/20] alteracao no gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 429873229..b1484a8cf 100755 --- a/.gitignore +++ b/.gitignore @@ -87,6 +87,7 @@ target/ *.sublime-workspace .ipynb_checkpoints/ *.ipynb +.vscode/* # specific to this project From a1e2545bd90e6a6113ea39083a9003e49be10c43 Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Thu, 11 Oct 2018 16:33:44 -0300 Subject: [PATCH 08/20] adicionados loggers em audiencia e base --- sapl/audiencia/forms.py | 8 ++++++ sapl/base/forms.py | 58 +++++++++++++++++++++++++++++++++++++++-- sapl/base/views.py | 21 +++++++++++++++ 3 files changed, 85 insertions(+), 2 deletions(-) diff --git a/sapl/audiencia/forms.py b/sapl/audiencia/forms.py index 9f55d3e6d..88dd04e4c 100755 --- a/sapl/audiencia/forms.py +++ b/sapl/audiencia/forms.py @@ -1,3 +1,5 @@ +import logging + from django import forms from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.db import transaction @@ -58,6 +60,8 @@ class AudienciaForm(forms.ModelForm): def clean(self): + logger = logging.getLogger(__name__) + cleaned_data = super(AudienciaForm, self).clean() if not self.is_valid(): return cleaned_data @@ -75,6 +79,8 @@ class AudienciaForm(forms.ModelForm): except ObjectDoesNotExist: msg = _('A matéria %s nº %s/%s não existe no cadastro' ' de matérias legislativas.' % (tipo_materia, materia, ano_materia)) + logger.error('- A matéria %s nº %s/%s não existe no cadastro' + ' de matérias legislativas.' % (tipo_materia, materia, ano_materia)) raise ValidationError(msg) else: cleaned_data['materia'] = materia @@ -83,6 +89,7 @@ class AudienciaForm(forms.ModelForm): campos = [materia, tipo_materia, ano_materia] if campos.count(None) + campos.count('') < len(campos): msg = _('Preencha todos os campos relacionados à Matéria Legislativa') + logger.error('- Algum campo relacionado à Matéria Legislativa não foi preenchido.') raise ValidationError(msg) if not cleaned_data['numero']: @@ -99,6 +106,7 @@ class AudienciaForm(forms.ModelForm): if (self.cleaned_data['hora_fim'] < self.cleaned_data['hora_inicio']): msg = _('A hora de fim não pode ser anterior a hora de início') + logger.error('- Hora de fim anterior à hora de início.') raise ValidationError(msg) return cleaned_data diff --git a/sapl/base/forms.py b/sapl/base/forms.py index 028f2c464..a4d095484 100755 --- a/sapl/base/forms.py +++ b/sapl/base/forms.py @@ -1,4 +1,6 @@ import django_filters +import logging + from crispy_forms.bootstrap import FieldWithButtons, InlineRadios, StrictButton from crispy_forms.helper import FormHelper from crispy_forms.layout import HTML, Button, Div, Field, Fieldset, Layout, Row @@ -74,6 +76,7 @@ class UsuarioCreateForm(ModelForm): 'password1', 'password2', 'user_active', 'roles'] def clean(self): + logger = logging.getLogger(__name__) super(UsuarioCreateForm, self).clean() if not self.is_valid(): @@ -81,6 +84,7 @@ class UsuarioCreateForm(ModelForm): data = self.cleaned_data if data['password1'] != data['password2']: + logger.error('- Erro de validação. Senha incorreta.') raise ValidationError('Senhas informadas são diferentes') return data @@ -148,6 +152,7 @@ class UsuarioEditForm(ModelForm): row3) def clean(self): + logger = logging.getLogger(__name__) super(UsuarioEditForm, self).clean() if not self.is_valid(): @@ -155,6 +160,7 @@ class UsuarioEditForm(ModelForm): data = self.cleaned_data if data['password1'] and data['password1'] != data['password2']: + logger.error('- Erro de validação. Senha incorreta.') raise ValidationError('Senhas informadas são diferentes') return data @@ -166,6 +172,7 @@ class SessaoLegislativaForm(ModelForm): exclude = [] def clean(self): + logger = logging.getLogger(__name__) cleaned_data = super(SessaoLegislativaForm, self).clean() if not self.is_valid(): @@ -179,7 +186,7 @@ class SessaoLegislativaForm(ModelForm): data_inicio_leg = legislatura.data_inicio data_fim_leg = legislatura.data_fim pk = self.initial['id'] if self.initial else None - # Queries para verificar se existem Sessões Legislativas no período selecionado no form + # Queries para verificar se existem Sessões Legislativas no período selecionado no form # Caso onde a data_inicio e data_fim são iguais a de alguma sessão já criada primeiro_caso = Q(data_inicio=data_inicio, data_fim=data_fim) # Caso onde a data_inicio está entre o início e o fim de uma Sessão já existente @@ -209,20 +216,27 @@ class SessaoLegislativaForm(ModelForm): ult = 0 if numero <= ult and flag_edit: + logger.error('- O número da Sessão Legislativa é menor ou igual ' + 'que o de Sessões Legislativas passadas') raise ValidationError('O número da Sessão Legislativa não pode ser menor ou igual ' 'que o de Sessões Legislativas passadas') if data_inicio < data_inicio_leg or \ data_inicio > data_fim_leg: + logger.error('- A data de início da Sessão Legislativa está compreendida ' + 'fora da data início e fim da Legislatura selecionada') raise ValidationError('A data de início da Sessão Legislativa deve estar compreendida ' 'entre a data início e fim da Legislatura selecionada') if data_fim > data_fim_leg or \ data_fim < data_inicio_leg: + logger.error('- A data de fim da Sessão Legislativa está compreendida ' + 'fora da data início e fim da Legislatura selecionada') raise ValidationError('A data de fim da Sessão Legislativa deve estar compreendida ' 'entre a data início e fim da Legislatura selecionada') if data_inicio > data_fim: + logger.error('- Data início superior à data fim') raise ValidationError('Data início não pode ser superior à data fim') data_inicio_intervalo = cleaned_data['data_inicio_intervalo'] @@ -230,6 +244,8 @@ class SessaoLegislativaForm(ModelForm): if data_inicio_intervalo and data_fim_intervalo and \ data_inicio_intervalo > data_fim_intervalo: + logger.error(' - Data início de intervalo' + 'superior à data fim de intervalo') raise ValidationError('Data início de intervalo não pode ser ' 'superior à data fim de intervalo') @@ -238,6 +254,9 @@ class SessaoLegislativaForm(ModelForm): data_inicio_intervalo < data_inicio_leg or \ data_inicio_intervalo > data_fim or \ data_inicio_intervalo > data_fim_leg: + logger.error('- A data de início do intervalo não está compreendida entre ' + 'as datas de início e fim tanto da Legislatura quanto da ' + 'própria Sessão Legislativa') raise ValidationError('A data de início do intervalo deve estar compreendida entre ' 'as datas de início e fim tanto da Legislatura quanto da ' 'própria Sessão Legislativa') @@ -246,6 +265,9 @@ class SessaoLegislativaForm(ModelForm): data_fim_intervalo > data_fim_leg or \ data_fim_intervalo < data_inicio or \ data_fim_intervalo < data_inicio_leg: + logger.error('- A data de fim do intervalo não está compreendida entre ' + 'as datas de início e fim tanto da Legislatura quanto da ' + 'própria Sessão Legislativa') raise ValidationError('A data de fim do intervalo deve estar compreendida entre ' 'as datas de início e fim tanto da Legislatura quanto da ' 'própria Sessão Legislativa') @@ -410,11 +432,14 @@ class AutorForm(ModelForm): if self.instance.user else ''}) def valida_igualdade(self, texto1, texto2, msg): + logger = logging.getLogger(__name__) if texto1 != texto2: + logger.error('- Textos diferentes.') raise ValidationError(msg) return True def clean(self): + logger = logging.getLogger(__name__) super(AutorForm, self).clean() if not self.is_valid(): @@ -424,6 +449,8 @@ class AutorForm(ModelForm): cd = self.cleaned_data if 'action_user' not in cd or not cd['action_user']: + logger.error('- Não Informado se o Autor terá usuário ' + 'vinculado para acesso ao Sistema.') raise ValidationError(_('Informe se o Autor terá usuário ' 'vinculado para acesso ao Sistema.')) @@ -433,6 +460,9 @@ class AutorForm(ModelForm): self.instance.user, get_user_model().USERNAME_FIELD) != cd['username']: if 'status_user' not in cd or not cd['status_user']: + logger.error('- Foi trocado ou removido o usuário deste Autor, ' + 'mas não foi informado como se deve proceder ' + 'com o usuário que está sendo desvinculado?') raise ValidationError( _('Foi trocado ou removido o usuário deste Autor, ' 'mas não foi informado como se deve proceder ' @@ -449,6 +479,7 @@ class AutorForm(ModelForm): if cd['action_user'] == 'A': param_username = {get_user_model().USERNAME_FIELD: cd['username']} if not User.objects.filter(**param_username).exists(): + logger.error('- Não existe usuário com username "%s". ' % cd['username']) raise ValidationError( _('Não existe usuário com username "%s". ' 'Para utilizar esse username você deve selecionar ' @@ -457,11 +488,13 @@ class AutorForm(ModelForm): if cd['action_user'] != 'N': if 'username' not in cd or not cd['username']: + logger.error('- Username não informado.') raise ValidationError(_('O username deve ser informado.')) param_username = { 'user__' + get_user_model().USERNAME_FIELD: cd['username']} if qs_autor.filter(**param_username).exists(): + logger.error('Já existe um Autor para este usuário.') raise ValidationError( _('Já existe um Autor para este usuário.')) @@ -471,6 +504,7 @@ class AutorForm(ModelForm): ainda assim para renderizar um message.danger no topo do form. """ if 'tipo' not in cd or not cd['tipo']: + logger.error('Tipo do Autor não selecionado.') raise ValidationError( _('O Tipo do Autor deve ser selecionado.')) @@ -478,18 +512,23 @@ class AutorForm(ModelForm): if not tipo.content_type: if 'nome' not in cd or not cd['nome']: + logger.error('- Nome do Autor não informado.') raise ValidationError( _('O Nome do Autor deve ser informado.')) else: if 'autor_related' not in cd or not cd['autor_related']: + logger.error('- Registro de %s não escolhido para ser ' + 'vinculado ao cadastro de Autor' % tipo.descricao) raise ValidationError( _('Um registro de %s deve ser escolhido para ser ' 'vinculado ao cadastro de Autor') % tipo.descricao) if not tipo.content_type.model_class().objects.filter( pk=cd['autor_related']).exists(): + logger.error('O Registro definido (%s-%s) não está na base ' + 'de %s.' % cd['autor_related'], cd['q'], tipo.descricao) raise ValidationError( - _('O Registro definido (%s-%s) não está na base de %s.' + _('- O Registro definido (%s-%s) não está na base de %s.' ) % (cd['autor_related'], cd['q'], tipo.descricao)) qs_autor_selected = qs_autor.filter( @@ -497,6 +536,8 @@ class AutorForm(ModelForm): content_type_id=cd['tipo'].content_type_id) if qs_autor_selected.exists(): autor = qs_autor_selected.first() + logger.error('- Já existe um autor Cadastrado para ' + '%s' % autor.autor_related) raise ValidationError( _('Já existe um autor Cadastrado para %s' ) % autor.autor_related) @@ -1000,14 +1041,18 @@ class ConfiguracoesAppForm(ModelForm): def clean_mostrar_brasao_painel(self): + logger = logging.getLogger(__name__) mostrar_brasao_painel = self.cleaned_data.get( 'mostrar_brasao_painel', False) casa = CasaLegislativa.objects.first() if not casa: + logger.error('- Não há casa legislativa relacionada.') raise ValidationError("Não há casa legislativa relacionada") if (not bool(casa.logotipo) and mostrar_brasao_painel): + logger.error('Não há logitipo configurado para esta ' + 'Casa legislativa.') raise ValidationError("Não há logitipo configurado para esta " "Casa legislativa.") @@ -1029,6 +1074,7 @@ class RecuperarSenhaForm(PasswordResetForm): super(RecuperarSenhaForm, self).__init__(*args, **kwargs) def clean(self): + logger = logging.getLogger(__name__) super(RecuperarSenhaForm, self).clean() if not self.is_valid(): @@ -1039,6 +1085,7 @@ class RecuperarSenhaForm(PasswordResetForm): if not email_existente: msg = 'Não existe nenhum usuário cadastrado com este e-mail.' + logger.error('- ' + msg) raise ValidationError(msg) return self.cleaned_data @@ -1093,6 +1140,7 @@ class AlterarSenhaForm(Form): form_actions(label='Alterar Senha')) def clean(self): + logger = logging.getLogger(__name__) super(AlterarSenhaForm, self).clean() if not self.is_valid(): @@ -1104,6 +1152,7 @@ class AlterarSenhaForm(Form): new_password2 = data['new_password2'] if new_password1 != new_password2: + logger.error("'Nova Senha' diferente de 'Confirmar Senha'") raise ValidationError("'Nova Senha' diferente de 'Confirmar Senha'") # TODO: colocar mais regras como: tamanho mínimo, @@ -1111,6 +1160,7 @@ class AlterarSenhaForm(Form): # TODO: senha atual igual a senha anterior, etc if len(new_password1) < 6: + logger.error('- A senha informada não tem o mínimo de 6 caracteres') raise ValidationError("A senha informada deve ter no mínimo 6 caracteres") username = data['username'] @@ -1118,13 +1168,17 @@ class AlterarSenhaForm(Form): user = User.objects.get(username=username) if user.is_anonymous(): + logger.error('- Não é possível alterar senha de usuário anônimo') raise ValidationError("Não é possível alterar senha de usuário anônimo") if not user.check_password(old_password): + logger.error('Senha atual informada não confere ' + 'com a senha armazenada') raise ValidationError("Senha atual informada não confere " "com a senha armazenada") if user.check_password(new_password1): + logger.error('Nova senha igual à senha anterior') raise ValidationError("Nova senha não pode ser igual à senha anterior") return self.cleaned_data diff --git a/sapl/base/views.py b/sapl/base/views.py index ce0e8e0cf..f3d14cb30 100755 --- a/sapl/base/views.py +++ b/sapl/base/views.py @@ -1,4 +1,5 @@ import os +import logging from django.contrib.auth import get_user_model from django.contrib.auth.mixins import PermissionRequiredMixin @@ -165,7 +166,9 @@ class AutorCrud(CrudAux): pk_autor = self.object.id url_reverse = reverse('sapl.base:autor_detail', kwargs={'pk': pk_autor}) + logger = logging.getLogger(__name__) try: + logger.info('- Enviando email na edição de Autores.') kwargs = {} user = self.object.user @@ -193,6 +196,7 @@ class AutorCrud(CrudAux): send_mail(assunto, mensagem, remetente, destinatario, fail_silently=False) except: + logger.error('- Erro no envio de email na edição de Autores.') sapl_logger.error( _('Erro no envio de email na edição de Autores.')) return url_reverse @@ -215,7 +219,10 @@ class AutorCrud(CrudAux): pk_autor = self.object.id url_reverse = reverse('sapl.base:autor_detail', kwargs={'pk': pk_autor}) + logger = logging.getLogger(__name__) try: + logger.info('- Enviando email na criação de Autores.') + kwargs = {} user = self.object.user @@ -245,6 +252,8 @@ class AutorCrud(CrudAux): except: sapl_logger.error( _('Erro no envio de email na criação de Autores.')) + logger.error('- Erro no envio de email na criação de Autores.') + return url_reverse @@ -279,6 +288,9 @@ class RelatorioPresencaSessaoView(FilterView): template_name = 'base/RelatorioPresencaSessao_filter.html' def get_context_data(self, **kwargs): + logger = logging.getLogger(__name__) + + context = super(RelatorioPresencaSessaoView, self).get_context_data(**kwargs) context['title'] = _('Presença dos parlamentares nas sessões') @@ -330,12 +342,17 @@ class RelatorioPresencaSessaoView(FilterView): 'ordemdia_porc': 0 }) try: + logger.info('Tentando obter presença do parlamentar.') sessao_count = presenca_sessao.get(parlamentar_id=p.id)[1] except ObjectDoesNotExist: + logger.error('Erro ao obter presença do parlamentar. Definido como 0.') sessao_count = 0 try: + # Presenças de cada Ordem do Dia + logger.info('Tentando obter presença de cada Ordem do Dia.') ordemdia_count = presenca_ordem.get(parlamentar_id=p.id)[1] except ObjectDoesNotExist: + logger.error('Erro ao obter presença de cada Ordem do Dia. Definido como 0.') ordemdia_count = 0 parlamentares_presencas[i].update({ @@ -835,10 +852,14 @@ class CasaLegislativaCrud(CrudAux): class HelpTopicView(TemplateView): def get_template_names(self): + logger = logging.getLogger(__name__) + topico = self.kwargs['topic'] try: + logger.info('- Tentando obter template %s.html.' % topico) get_template('ajuda/%s.html' % topico) except TemplateDoesNotExist: + logger.error('- Erro ao obter template %s.html. Template não existe.' % topico) raise Http404() return ['ajuda/%s.html' % topico] From 1aba659b613633646b36daacb3a66c9afdaabcfe Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Thu, 11 Oct 2018 17:00:54 -0300 Subject: [PATCH 09/20] terminados os logs de comissoes --- sapl/comissoes/forms.py | 32 ++++++++++++++++++++++++++++++-- sapl/comissoes/views.py | 8 ++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/sapl/comissoes/forms.py b/sapl/comissoes/forms.py index c51f89a68..ae938d61a 100755 --- a/sapl/comissoes/forms.py +++ b/sapl/comissoes/forms.py @@ -1,3 +1,5 @@ +import logging + from django import forms from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError @@ -24,6 +26,7 @@ class ComposicaoForm(forms.ModelForm): self.fields['comissao'].widget.attrs['disabled'] = 'disabled' def clean(self): + logger = logging.getLogger(__name__) cleaned_data = super(ComposicaoForm, self).clean() if not self.is_valid(): @@ -39,6 +42,9 @@ class ComposicaoForm(forms.ModelForm): comissao_id=comissao_pk) if intersecao_periodo: + logger.error('- O período informado ' + 'choca com períodos já ' + 'cadastrados para esta comissão') raise ValidationError('O período informado ' 'choca com períodos já ' 'cadastrados para esta comissão') @@ -53,6 +59,7 @@ class PeriodoForm(forms.ModelForm): exclude = [] def clean(self): + logger = logging.getLogger(__name__) cleaned_data = super(PeriodoForm, self).clean() if not self.is_valid(): @@ -62,8 +69,10 @@ class PeriodoForm(forms.ModelForm): data_fim = cleaned_data['data_fim'] if data_fim and data_fim < data_inicio: + logger.error(' - A Data Final é menor que ' + 'a Data Inicial') raise ValidationError('A Data Final não pode ser menor que ' - 'a Data Inicial') + 'a Data Inicial') # Evita NoneType exception se não preenchida a data_fim if not data_fim: @@ -74,6 +83,9 @@ class PeriodoForm(forms.ModelForm): )) if not legislatura: + logger.error(' - O período informado ' + 'não está contido em uma única ' + 'legislatura existente') raise ValidationError('O período informado ' 'deve estar contido em uma única ' 'legislatura existente') @@ -126,6 +138,7 @@ class ParticipacaoCreateForm(forms.ModelForm): def clean(self): + logger = logging.getLogger(__name__) cleaned_data = super(ParticipacaoCreateForm, self).clean() if not self.is_valid(): @@ -135,7 +148,9 @@ class ParticipacaoCreateForm(forms.ModelForm): data_desligamento = cleaned_data['data_desligamento'] if data_desligamento and \ - data_designacao > data_desligamento: + data_designacao > data_desligamento: + logger.error(' - Data de designação superior ' + 'à data de desligamento') raise ValidationError(_('Data de designação não pode ser superior ' 'à data de desligamento')) @@ -144,6 +159,7 @@ class ParticipacaoCreateForm(forms.ModelForm): if cleaned_data['cargo'].nome in cargos_unicos: msg = _('Este cargo é único para esta Comissão.') + logger.error('- ' + msg) raise ValidationError(msg) return cleaned_data @@ -209,6 +225,7 @@ class ParticipacaoEditForm(forms.ModelForm): self.fields['nome_parlamentar'].widget.attrs['disabled'] = 'disabled' def clean(self): + logger = logging.getLogger(__name__) cleaned_data = super(ParticipacaoEditForm, self).clean() if not self.is_valid(): @@ -219,6 +236,8 @@ class ParticipacaoEditForm(forms.ModelForm): if data_desligamento and \ data_designacao > data_desligamento: + logger.error('- Data de designação superior ' + 'à data de desligamento') raise ValidationError(_('Data de designação não pode ser superior ' 'à data de desligamento')) @@ -229,6 +248,7 @@ class ParticipacaoEditForm(forms.ModelForm): if cleaned_data['cargo'].nome in cargos_unicos: msg = _('Este cargo é único para esta Comissão.') + logger.error('- ' + msg) raise ValidationError(msg) return cleaned_data @@ -254,6 +274,7 @@ class ComissaoForm(forms.ModelForm): def clean(self): + logger = logging.getLogger(__name__) super(ComissaoForm, self).clean() if not self.is_valid(): @@ -261,36 +282,43 @@ class ComissaoForm(forms.ModelForm): if len(self.cleaned_data['nome']) > 100: msg = _('Nome da Comissão deve ter no máximo 50 caracteres.') + logger.error('- ' + msg) raise ValidationError(msg) if (self.cleaned_data['data_extincao'] and self.cleaned_data['data_extincao'] < self.cleaned_data['data_criacao']): msg = _('Data de extinção não pode ser menor que a de criação') + logger.error('- ' + msg) raise ValidationError(msg) if (self.cleaned_data['data_final_prevista_temp'] and self.cleaned_data['data_final_prevista_temp'] < self.cleaned_data['data_criacao']): msg = _('Data Prevista para Término não pode ser menor que a de criação') + logger.error('- ' + msg) raise ValidationError(msg) if (self.cleaned_data['data_prorrogada_temp'] and self.cleaned_data['data_prorrogada_temp'] < self.cleaned_data['data_criacao']): msg = _('Data Novo Prazo não pode ser menor que a de criação') + logger.error('- ' + msg) raise ValidationError(msg) if (self.cleaned_data['data_instalacao_temp'] and self.cleaned_data['data_instalacao_temp'] < self.cleaned_data['data_criacao']): msg = _('Data de Instalação não pode ser menor que a de criação') + logger.error('- ' + msg) raise ValidationError(msg) if (self.cleaned_data['data_final_prevista_temp'] and self.cleaned_data['data_instalacao_temp'] and self.cleaned_data['data_final_prevista_temp'] < self.cleaned_data['data_instalacao_temp']): msg = _('Data Prevista para Término não pode ser menor que a de Instalação') + logger.error('- ' + msg) raise ValidationError(msg) if (self.cleaned_data['data_prorrogada_temp'] and self.cleaned_data['data_instalacao_temp'] and self.cleaned_data['data_prorrogada_temp'] < self.cleaned_data['data_instalacao_temp']): msg = _('Data Novo Prazo não pode ser menor que a de Instalação') + logger.error('- ' + msg) raise ValidationError(msg) return self.cleaned_data diff --git a/sapl/comissoes/views.py b/sapl/comissoes/views.py index 78e639168..687fa1332 100755 --- a/sapl/comissoes/views.py +++ b/sapl/comissoes/views.py @@ -1,4 +1,6 @@ +import logging + from django.core.urlresolvers import reverse from django.db.models import F from django.http.response import HttpResponseRedirect @@ -106,9 +108,12 @@ class ComposicaoCrud(MasterDetailCrud): paginate_by = None def take_composicao_pk(self): + logger = logging.getLogger(__name__) try: + logger.info('- Tentando obter pk da composição.') return int(self.request.GET['pk']) except: + logger.error('- Erro ao obter pk da composição. Retornado 0.') return 0 def get_context_data(self, **kwargs): @@ -196,9 +201,12 @@ class ReuniaoCrud(MasterDetailCrud): paginate_by = 10 def take_reuniao_pk(self): + logger = logging.getLogger(__name__) try: + logger.info('- Tentando obter pk da reunião.') return int(self.request.GET['pk']) except: + logger.error('- Erro ao obter pk da reunião. Retornado 0.') return 0 def get_context_data(self, **kwargs): From 889f0d9ba5abd19c799a2e8f643c607e31b4cdd2 Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Thu, 11 Oct 2018 18:27:46 -0300 Subject: [PATCH 10/20] loggers na view do app materia --- sapl/materia/views.py | 87 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 74 insertions(+), 13 deletions(-) diff --git a/sapl/materia/views.py b/sapl/materia/views.py index 9e738dbe9..8c1fc6d21 100755 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -7,7 +7,7 @@ from crispy_forms.layout import HTML from django.contrib import messages from django.contrib.auth.decorators import permission_required from django.contrib.auth.mixins import PermissionRequiredMixin -from django.core.exceptions import ObjectDoesNotExist +from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from django.core.urlresolvers import reverse from django.db.models import Max from django.http import HttpResponse, JsonResponse @@ -21,6 +21,7 @@ from django.views.generic.base import RedirectView from django.views.generic.edit import FormView from django_filters.views import FilterView import weasyprint +import logging import sapl from sapl.base.models import Autor, CasaLegislativa @@ -92,6 +93,8 @@ def autores_ja_adicionados(materia_pk): def proposicao_texto(request, pk): + logger = logging.getLogger(__name__) + logger.info('- Tentando obter objeto Proposicao.') proposicao = Proposicao.objects.get(pk=pk) if proposicao.texto_original: @@ -113,6 +116,7 @@ def proposicao_texto(request, pk): response['Content-Disposition'] = ( 'inline; filename="%s"' % arquivo.name.split('/')[-1]) return response + logger.error('- Objeto Proposicao não encontrado.') raise Http404 @@ -171,21 +175,26 @@ class CriarProtocoloMateriaView(CreateView): 'pk': materia.pk}) def get_context_data(self, **kwargs): + logger = logging.getLogger(__name__) context = super( CriarProtocoloMateriaView, self).get_context_data(**kwargs) try: + logger.info("- Tentando obter objeto Protocolo.") protocolo = Protocolo.objects.get(pk=self.kwargs['pk']) except ObjectDoesNotExist: + logger.error("- Objeto Protocolo não encontrado.") raise Http404() numero = 1 try: + logger.info("- Tentando obter materias do último ano.") materias_ano = MateriaLegislativa.objects.filter( ano=protocolo.ano, tipo=protocolo.tipo_materia).latest('numero') numero = materias_ano.numero + 1 except ObjectDoesNotExist: + logger.error("- Não foram encontradas matérias no último ano. Definido 1 como padrão.") pass # numero ficou com o valor padrão 1 acima context['form'].fields['tipo'].initial = protocolo.tipo_materia @@ -198,11 +207,14 @@ class CriarProtocoloMateriaView(CreateView): return context def form_valid(self, form): + logger = logging.getLogger(__name__) materia = form.save() try: + logger.info("- Tentando obter objeto Procolo.") protocolo = Protocolo.objects.get(pk=self.kwargs['pk']) except ObjectDoesNotExist: + logger.error('- Objeto Protocolo não encontrado.') raise Http404() if protocolo.autor: @@ -286,14 +298,17 @@ class ProposicaoTaView(IntegracaoTaView): @permission_required('materia.detail_materialegislativa') def recuperar_materia(request): + logger = logging.getLogger(__name__) tipo = TipoMateriaLegislativa.objects.get(pk=request.GET['tipo']) ano = request.GET.get('ano', '') numeracao = None try: + logger.info("Tentando obter numeração da matéria.") numeracao = sapl.base.models.AppConfig.objects.last( ).sequencia_numeracao - except AttributeError: + except AttributeError as e: + logger.error("- Excessão " + str(e) + ". Numeracao da matéria definida como None.") pass if tipo.sequencia_numeracao: @@ -521,18 +536,21 @@ class RetornarProposicao(UpdateView): permission_required = ('materia.detail_proposicao_enviada', ) def dispatch(self, request, *args, **kwargs): - + logger = logging.getLogger(__name__) try: + logger.info("Tentando obter objeto Proposicao.") p = Proposicao.objects.get(id=kwargs['pk']) except: + logger.error("Objeto Proposicao não encontrado.") raise Http404() if p.autor.user != request.user: - messages.error( + logger.error("'Usuário sem acesso a esta opção.'") + messages.error( request, 'Usuário sem acesso a esta opção.' % request.user) - return redirect('/') + return redirect('/') return super(RetornarProposicao, self).dispatch( request, *args, **kwargs) @@ -554,12 +572,14 @@ class ConfirmarProposicao(PermissionRequiredForAppCrudMixin, UpdateView): return self.object.results['url'] def get_object(self, queryset=None): + logger = logging.getLogger(__name__) try: """ Não deve haver acesso na rotina de confirmação a proposições: já recebidas -> data_recebimento != None não enviadas -> data_envio == None """ + logger.info("- Tentando obter objeto Proposicao.") proposicao = Proposicao.objects.get(pk=self.kwargs['pk'], data_envio__isnull=False, data_recebimento__isnull=True) @@ -576,9 +596,11 @@ class ConfirmarProposicao(PermissionRequiredForAppCrudMixin, UpdateView): if hasher == 'P%s/%s' % (self.kwargs['hash'], proposicao.pk): self.object = proposicao except: + logger.error("- Objeto Proposicao não encontrado.") raise Http404() if not self.object: + logger.error("- Objeto vazio.") raise Http404() return self.object @@ -704,6 +726,7 @@ class ProposicaoCrud(Crud): return context def get(self, request, *args, **kwargs): + logger = logging.getLogger(__name__) action = request.GET.get('action', '') if not action: @@ -736,17 +759,21 @@ class ProposicaoCrud(Crud): messages.success(request, _( 'Proposição enviada com sucesso.')) try: + logger.info("- Tentando obter objeto MateriaLegislativa.") numero = MateriaLegislativa.objects.filter(tipo=p.tipo.tipo_conteudo_related, ano=p.ano).last().numero + 1 messages.success(request, _( '%s : nº %s de %s
Atenção! Este número é apenas um provável ' 'número que pode não corresponder com a realidade' % (p.tipo, numero, p.ano))) - except ValueError: + except ValueError as e: + logger.error("- " + str(e)) pass - except AttributeError: + except AttributeError as e: + logger.error("- " + str(e)) pass - except TypeError: + except TypeError as e: + logger.error("- " + str(e)) pass elif action == 'return': @@ -774,10 +801,12 @@ class ProposicaoCrud(Crud): kwargs={'pk': kwargs['pk']})) def dispatch(self, request, *args, **kwargs): - + logger = logging.getLogger(__name__) try: + logger.info("- Tentando obter objeto Proposicao") p = Proposicao.objects.get(id=kwargs['pk']) except: + logger.error("- Erro ao obter proposicao. Retornando 404.") raise Http404() if not self.has_permission(): @@ -974,15 +1003,19 @@ class RelatoriaCrud(MasterDetailCrud): form_class = RelatoriaForm def get_context_data(self, **kwargs): + logger = logging.getLogger(__name__) context = super().get_context_data(**kwargs) try: + logger.info("- Tentando obter objeto Comissao.") comissao = Comissao.objects.get( pk=context['form'].initial['comissao']) except: + logger.error("- Objeto Comissão não encontrado.") pass else: + logger.info("- Objeto Comissao obtido com sucesso.") composicao = comissao.composicao_set.order_by( '-periodo__data_inicio').first() participacao = Participacao.objects.filter( @@ -1019,14 +1052,18 @@ class RelatoriaCrud(MasterDetailCrud): form_class = RelatoriaForm def get_context_data(self, **kwargs): + logger = logging.getLogger(__name__) context = super().get_context_data(**kwargs) try: + logger.info("- Tentando obter objeto Comissao.") comissao = Comissao.objects.get( pk=context['form'].initial['comissao']) - except ObjectDoesNotExist: + except ObjectDoesNotExist: + logger.error("- Objeto Comissão não encontrado.") pass - else: + else: + logger.info("- Objeto Comissao obtido com sucesso.") composicao = comissao.composicao_set.order_by( '-periodo__data_inicio').first() participacao = Participacao.objects.filter( @@ -1097,6 +1134,8 @@ class TramitacaoCrud(MasterDetailCrud): return context def form_valid(self, form): + logger = logging.getLogger(__name__) + self.object = form.save() if form.instance.status.indicador == 'F': @@ -1106,6 +1145,7 @@ class TramitacaoCrud(MasterDetailCrud): form.instance.materia.save() try: + logger.info("Tentando enviar Tramitacao.") tramitacao_signal.send(sender=Tramitacao, post=self.object, request=self.request) @@ -1114,6 +1154,9 @@ class TramitacaoCrud(MasterDetailCrud): msg = _('Tramitação criada, mas e-mail de acompanhamento ' 'de matéria não enviado. Há problemas na configuração ' 'do e-mail.') + logger.error('- Tramitação criada, mas e-mail de acompanhamento ' + 'de matéria não enviado. Há problemas na configuração ' + 'do e-mail.') messages.add_message(self.request, messages.ERROR, msg) return HttpResponseRedirect(self.get_success_url()) return super().form_valid(form) @@ -1124,6 +1167,7 @@ class TramitacaoCrud(MasterDetailCrud): layout_key = 'TramitacaoUpdate' def form_valid(self, form): + logger = logging.getLogger(__name__) self.object = form.save() if form.instance.status.indicador == 'F': @@ -1133,6 +1177,7 @@ class TramitacaoCrud(MasterDetailCrud): form.instance.materia.save() try: + logger.info("Tentando enviar Tramitacao.") tramitacao_signal.send(sender=Tramitacao, post=self.object, request=self.request) @@ -1141,6 +1186,9 @@ class TramitacaoCrud(MasterDetailCrud): msg = _('Tramitação atualizada, mas e-mail de acompanhamento ' 'de matéria não enviado. Há problemas na configuração ' 'do e-mail.') + logger.error('- Tramitação atualizada, mas e-mail de acompanhamento ' + 'de matéria não enviado. Há problemas na configuração ' + 'do e-mail.') messages.add_message(self.request, messages.ERROR, msg) return HttpResponseRedirect(self.get_success_url()) return super().form_valid(form) @@ -1516,20 +1564,24 @@ class AcompanhamentoConfirmarView(TemplateView): kwargs={'pk': self.kwargs['pk']}) def get(self, request, *args, **kwargs): + logger = logging.getLogger(__name__) materia_id = kwargs['pk'] hash_txt = request.GET.get('hash_txt', '') try: + logger.info("- Tentando obter objeto AcompanhamentoMateria.") acompanhar = AcompanhamentoMateria.objects.get( materia_id=materia_id, hash=hash_txt) except ObjectDoesNotExist: + logger.error("- Objeto AcompanhamentoMateria não encontrado.") raise Http404() - # except MultipleObjectsReturned: + except MultipleObjectsReturned as e: # A melhor solução deve ser permitir que a exceção # (MultipleObjectsReturned) seja lançada e vá para o log, # pois só poderá ser causada por um erro de desenvolvimente - + logger.error("- " + str(e)) + pass acompanhar.confirmado = True acompanhar.save() @@ -1545,13 +1597,16 @@ class AcompanhamentoExcluirView(TemplateView): kwargs={'pk': self.kwargs['pk']}) def get(self, request, *args, **kwargs): + logger = logging.getLogger(__name__) materia_id = kwargs['pk'] hash_txt = request.GET.get('hash_txt', '') try: + logger.info("- Tentando obter objeto AcompanhamentoMateria.") AcompanhamentoMateria.objects.get(materia_id=materia_id, hash=hash_txt).delete() except ObjectDoesNotExist: + logger.error("- Objeto AcompanhamentoMateria não encontrado.") pass return HttpResponseRedirect(self.get_success_url()) @@ -1814,6 +1869,7 @@ class PrimeiraTramitacaoEmLoteView(PermissionRequiredMixin, FilterView): def post(self, request, *args, **kwargs): + logger = logging.getLogger(__name__) marcadas = request.POST.getlist('materia_id') tz = timezone.get_current_timezone() @@ -1869,10 +1925,14 @@ class PrimeiraTramitacaoEmLoteView(PermissionRequiredMixin, FilterView): ) t.save() try: + logger.info("Tentando enviar tramitação.") tramitacao_signal.send(sender=Tramitacao, post=t, request=self.request) except Exception: + logger.error('Tramitação criada, mas e-mail de acompanhamento ' + 'de matéria não enviado. Há problemas na configuração ' + 'do e-mail.') flag_error = True if flag_error: msg = _('Tramitação criada, mas e-mail de acompanhamento ' @@ -1890,6 +1950,7 @@ class PrimeiraTramitacaoEmLoteView(PermissionRequiredMixin, FilterView): materia.save() msg = _('Tramitação completa.') + logger.info('Tramitação completa.') messages.add_message(request, messages.SUCCESS, msg) return self.get(request, self.kwargs) From 2a4f4dbd7104a4467f888aee8c5ce86474317646 Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Mon, 15 Oct 2018 14:21:01 -0300 Subject: [PATCH 11/20] loggers feitos nos forms de materia e no app norma --- sapl/materia/forms.py | 100 ++- sapl/norma/forms.py | 20 + sapl/norma/views.py | 7 + sapl/static/styles/app.css | 494 +++++++++++++ sapl/static/styles/compilacao.css | 1136 +++++++++++++++++++++++++++++ 5 files changed, 1752 insertions(+), 5 deletions(-) create mode 100755 sapl/static/styles/app.css create mode 100755 sapl/static/styles/compilacao.css diff --git a/sapl/materia/forms.py b/sapl/materia/forms.py index c353b862f..478a94269 100755 --- a/sapl/materia/forms.py +++ b/sapl/materia/forms.py @@ -1,6 +1,6 @@ import os - +import logging import django_filters from crispy_forms.bootstrap import Alert, FormActions, InlineRadios from crispy_forms.helper import FormHelper @@ -146,6 +146,7 @@ class MateriaSimplificadaForm(ModelForm): def clean(self): super(MateriaSimplificadaForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -156,6 +157,8 @@ class MateriaSimplificadaForm(ModelForm): ano = cleaned_data['ano'] if data_apresentacao.year != ano: + logger.error("- O ano da matéria é diferente" + " do ano na data de apresentação") raise ValidationError("O ano da matéria não pode ser " "diferente do ano na data de apresentação") @@ -191,6 +194,7 @@ class MateriaLegislativaForm(ModelForm): def clean(self): super(MateriaLegislativaForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -204,6 +208,8 @@ class MateriaLegislativaForm(ModelForm): if protocolo: if not Protocolo.objects.filter(numero=protocolo,ano=ano).exists(): + logger.error("- Protocolo %s/%s não" + " existe" % (protocolo, ano)) raise ValidationError(_('Protocolo %s/%s não' ' existe' % (protocolo, ano))) @@ -217,15 +223,21 @@ class MateriaLegislativaForm(ModelForm): ano=ano).exists() if exist_materia or exist_doc: + logger.error("- Protocolo %s/%s ja possui" + " documento vinculado" + % (protocolo, ano)) raise ValidationError(_('Protocolo %s/%s ja possui' ' documento vinculado' % (protocolo, ano))) p = Protocolo.objects.get(numero=protocolo,ano=ano) if p.tipo_materia != cleaned_data['tipo']: + logger.error("- Tipo do Protocolo deve ser o mesmo do Tipo Matéria") raise ValidationError(_('Tipo do Protocolo deve ser o mesmo do Tipo Matéria')) if data_apresentacao.year != ano: + logger.error("- O ano da matéria é diferente " + "do ano na data de apresentação") raise ValidationError(_("O ano da matéria não pode ser " "diferente do ano na data de apresentação")) @@ -234,6 +246,8 @@ class MateriaLegislativaForm(ModelForm): if ano_origem_externa and data_origem_externa and \ ano_origem_externa != data_origem_externa.year: + logger.error("O ano de origem externa da matéria é " + " diferente do ano na data de origem externa") raise ValidationError(_("O ano de origem externa da matéria não " "pode ser diferente do ano na data de " "origem externa")) @@ -266,6 +280,7 @@ class UnidadeTramitacaoForm(ModelForm): def clean(self): super(UnidadeTramitacaoForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -278,6 +293,7 @@ class UnidadeTramitacaoForm(ModelForm): if len(cleaned_data) != 1: msg = _('Somente um campo deve ser preenchido!') + logger.error("- Somente um campo deve ser preenchido!") raise ValidationError(msg) return cleaned_data @@ -327,6 +343,7 @@ class RelatoriaForm(ModelForm): def clean(self): super(RelatoriaForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -334,8 +351,10 @@ class RelatoriaForm(ModelForm): cleaned_data = self.cleaned_data try: + logger.info("- Tentando obter objeto Comissao.") comissao = Comissao.objects.get(id=self.initial['comissao']) except ObjectDoesNotExist: + logger.error("- A localização atual deve ser uma comissão.") msg = _('A localização atual deve ser uma comissão.') raise ValidationError(msg) else: @@ -364,6 +383,7 @@ class TramitacaoForm(ModelForm): def clean(self): super(TramitacaoForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -390,30 +410,40 @@ class TramitacaoForm(ModelForm): if (destino != self.cleaned_data['unidade_tramitacao_local']): msg = _('A origem da nova tramitação deve ser igual ao ' 'destino da última adicionada!') + logger.error("- A origem da nova tramitação deve ser igual ao " + "destino da última adicionada!") raise ValidationError(msg) if cleaned_data['data_tramitacao'] > timezone.now().date(): msg = _( 'A data de tramitação deve ser ' + 'menor ou igual a data de hoje!') + logger.error("- A data de tramitação deve ser " + "menor ou igual a data de hoje!") raise ValidationError(msg) if (ultima_tramitacao and data_tram_form < ultima_tramitacao.data_tramitacao): msg = _('A data da nova tramitação deve ser ' + 'maior que a data da última tramitação!') + logger.error("- A data da nova tramitação deve ser " + "maior que a data da última tramitação!") raise ValidationError(msg) if data_enc_form: if data_enc_form < data_tram_form: msg = _('A data de encaminhamento deve ser ' + 'maior que a data de tramitação!') + logger.error("- A data de encaminhamento deve ser " + "maior que a data de tramitação!") raise ValidationError(msg) if data_prazo_form: if data_prazo_form < data_tram_form: msg = _('A data fim de prazo deve ser ' + 'maior que a data de tramitação!') + logger.error("- A data fim de prazo deve ser " + + "maior que a data de tramitação!") raise ValidationError(msg) return cleaned_data @@ -446,6 +476,7 @@ class TramitacaoUpdateForm(TramitacaoForm): def clean(self): super(TramitacaoUpdateForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -460,6 +491,9 @@ class TramitacaoUpdateForm(TramitacaoForm): if ultima_tramitacao != self.instance: if self.cleaned_data['unidade_tramitacao_destino'] != \ self.instance.unidade_tramitacao_destino: + logger.error("- Você não pode mudar a Unidade de Destino desta " + "tramitação, pois irá conflitar com a Unidade " + "Local da tramitação seguinte") raise ValidationError( 'Você não pode mudar a Unidade de Destino desta ' 'tramitação, pois irá conflitar com a Unidade ' @@ -506,6 +540,7 @@ class LegislacaoCitadaForm(ModelForm): def clean(self): super(LegislacaoCitadaForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -513,11 +548,14 @@ class LegislacaoCitadaForm(ModelForm): cleaned_data = self.cleaned_data try: + logger.info("- Tentando obter objeto NormalJuridica.") norma = NormaJuridica.objects.get( numero=cleaned_data['numero'], ano=cleaned_data['ano'], tipo=cleaned_data['tipo']) except ObjectDoesNotExist: + logger.error("- A norma a ser inclusa não existe no cadastro" + " de Normas.") msg = _('A norma a ser inclusa não existe no cadastro' ' de Normas.') raise ValidationError(msg) @@ -543,10 +581,12 @@ class LegislacaoCitadaForm(ModelForm): if not self.instance.id: if filtro_base.exists(): msg = _('Essa Legislação já foi cadastrada.') + logger.error("- Essa Legislação já foi cadastrada.") raise ValidationError(msg) else: if filtro_base.exclude(id=self.instance.id).exists(): msg = _('Essa Legislação já foi cadastrada.') + logger.error("- Essa Legislação já foi cadastrada.") raise ValidationError(msg) return cleaned_data @@ -569,11 +609,13 @@ class NumeracaoForm(ModelForm): def clean(self): super(NumeracaoForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data try: + logger.info("- Tentando obter objeto MateriaLegislativa.") MateriaLegislativa.objects.get( numero=self.cleaned_data['numero_materia'], ano=self.cleaned_data['ano_materia'], @@ -581,6 +623,8 @@ class NumeracaoForm(ModelForm): except ObjectDoesNotExist: msg = _('A matéria a ser inclusa não existe no cadastro' ' de matérias legislativas.') + logger.error("- A matéria a ser inclusa não existe no cadastro " + " de matérias legislativas.") raise ValidationError(msg) if Numeracao.objects.filter( @@ -590,6 +634,7 @@ class NumeracaoForm(ModelForm): numero_materia=self.cleaned_data['numero_materia'] ).exists(): msg = _('Essa numeração já foi cadastrada.') + logger.error("- Essa numeração já foi cadastrada.") raise ValidationError(msg) return self.cleaned_data @@ -614,6 +659,7 @@ class AnexadaForm(ModelForm): def clean(self): super(AnexadaForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -621,6 +667,7 @@ class AnexadaForm(ModelForm): cleaned_data = self.cleaned_data try: + logger.info("Tentando obter objeto MateriaLegislativa.") materia_anexada = MateriaLegislativa.objects.get( numero=cleaned_data['numero'], ano=cleaned_data['ano'], @@ -628,17 +675,21 @@ class AnexadaForm(ModelForm): except ObjectDoesNotExist: msg = _('A matéria a ser anexada não existe no cadastro' ' de matérias legislativas.') + logger.error("- A matéria a ser anexada não existe no cadastro" + " de matérias legislativas.") raise ValidationError(msg) materia_principal = self.instance.materia_principal if materia_principal == materia_anexada: + logger.error("- Matéria não pode ser anexada a si mesma.") raise ValidationError(_('Matéria não pode ser anexada a si mesma')) is_anexada = Anexada.objects.filter(materia_principal=materia_principal, materia_anexada=materia_anexada ).exists() if is_anexada: - raise ValidationError(_('Materia já se encontra anexada')) + logger.error("- Matéria já se encontra anexada.") + raise ValidationError(_('Matéria já se encontra anexada')) cleaned_data['materia_anexada'] = materia_anexada @@ -860,6 +911,7 @@ class AutoriaForm(ModelForm): def clean(self): cd = super(AutoriaForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -870,6 +922,7 @@ class AutoriaForm(ModelForm): if ((not pk and autorias.exists()) or (pk and autorias.exclude(pk=pk).exists())): + logger.error("- Esse Autor já foi cadastrado.") raise ValidationError(_('Esse Autor já foi cadastrado.')) return cd @@ -913,11 +966,13 @@ class AutoriaMultiCreateForm(Form): def clean(self): cd = super().clean() + logger = logging.getLogger(__name__) if 'autores' in self.errors: del self.errors['autores'] if 'autor' not in cd or not cd['autor'].exists(): + logger.error("- Ao menos um autor deve ser selecionado para inclusão") raise ValidationError( _('Ao menos um autor deve ser selecionado para inclusão')) @@ -1083,6 +1138,7 @@ class TipoProposicaoForm(ModelForm): def clean(self): super(TipoProposicaoForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -1093,11 +1149,14 @@ class TipoProposicaoForm(ModelForm): if 'tipo_conteudo_related' not in cd or not cd[ 'tipo_conteudo_related']: + logger.error("- Seleção de Tipo não definida.") raise ValidationError( - _('Seleção de Tipo não definida')) + _('Seleção de Tipo não definida.')) if not content_type.model_class().objects.filter( pk=cd['tipo_conteudo_related']).exists(): + logger.error("- O Registro definido (%s) não está na base de %s." + % (cd['tipo_conteudo_related'], content_type)) raise ValidationError( _('O Registro definido (%s) não está na base de %s.' ) % (cd['tipo_conteudo_related'], content_type)) @@ -1296,9 +1355,11 @@ class ProposicaoForm(forms.ModelForm): ].initial = self.instance.materia_de_vinculo.ano def clean_texto_original(self): + logger = logging.getLogger(__name__) texto_original = self.cleaned_data.get('texto_original', False) if texto_original and texto_original.size > MAX_DOC_UPLOAD_SIZE: max_size = str(MAX_DOC_UPLOAD_SIZE / (1024 * 1024)) + logger.error("- Arquivo muito grande. ( > {0}MB )".format(max_size)) raise ValidationError( "Arquivo muito grande. ( > {0}MB )".format(max_size)) return texto_original @@ -1319,6 +1380,7 @@ class ProposicaoForm(forms.ModelForm): def clean(self): super(ProposicaoForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -1331,14 +1393,17 @@ class ProposicaoForm(forms.ModelForm): if tm and am and nm: try: + logger.info("- Tentando obter objeto MateriaLegislativa.") materia_de_vinculo = MateriaLegislativa.objects.get( tipo_id=tm, ano=am, numero=nm ) except ObjectDoesNotExist: + logger.error("- Matéria Vinculada não existe!") raise ValidationError(_('Matéria Vinculada não existe!')) else: + logger.info("- Matéria vinculada com sucesso.") cd['materia_de_vinculo'] = materia_de_vinculo return cd @@ -1414,6 +1479,7 @@ class DevolverProposicaoForm(forms.ModelForm): def clean(self): super(DevolverProposicaoForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -1423,6 +1489,7 @@ class DevolverProposicaoForm(forms.ModelForm): if 'justificativa_devolucao' not in cd or\ not cd['justificativa_devolucao']: # TODO Implementar notificação ao autor por email + logger.error("- Adicione uma Justificativa para devolução.") raise ValidationError( _('Adicione uma Justificativa para devolução.')) return cd @@ -1493,6 +1560,7 @@ class ConfirmarProposicaoForm(ProposicaoForm): } def __init__(self, *args, **kwargs): + logger = logging.getLogger(__name__) self.proposicao_incorporacao_obrigatoria = \ sapl.base.models.AppConfig.attr( @@ -1514,6 +1582,7 @@ class ConfirmarProposicaoForm(ProposicaoForm): self.instance = kwargs.get('instance', None) if not self.instance: + logger.error("- Erro na Busca por proposição a incorporar") raise ValueError(_('Erro na Busca por proposição a incorporar')) if self.instance.tipo.content_type.model_class() == TipoDocumento: @@ -1599,6 +1668,7 @@ class ConfirmarProposicaoForm(ProposicaoForm): def clean(self): super(ConfirmarProposicaoForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -1606,6 +1676,9 @@ class ConfirmarProposicaoForm(ProposicaoForm): numeracao = sapl.base.models.AppConfig.attr('sequencia_numeracao') if not numeracao: + logger.error("- A sequência de numeração (por ano ou geral)" + " não foi configurada para a aplicação em " + "tabelas auxiliares") raise ValidationError("A sequência de numeração (por ano ou geral)" " não foi configurada para a aplicação em " "tabelas auxiliares") @@ -1616,12 +1689,14 @@ class ConfirmarProposicaoForm(ProposicaoForm): TipoMateriaLegislativa: if 'regime_tramitacao' not in cd or\ not cd['regime_tramitacao']: + logger.error("- Regime de Tramitação deve ser informado.") raise ValidationError( _('Regime de Tramitação deve ser informado.')) elif self.instance.tipo.content_type.model_class( ) == TipoDocumento and not cd['materia_de_vinculo']: - + logger.error("- Documentos não podem ser incorporados sem definir " + "para qual Matéria Legislativa ele se destina.") raise ValidationError( _('Documentos não podem ser incorporados sem definir ' 'para qual Matéria Legislativa ele se destina.')) @@ -1630,6 +1705,7 @@ class ConfirmarProposicaoForm(ProposicaoForm): @transaction.atomic def save(self, commit=False): + logger = logging.getLogger(__name__) # TODO Implementar workflow entre protocolo e autores cd = self.cleaned_data @@ -1673,9 +1749,11 @@ class ConfirmarProposicaoForm(ProposicaoForm): numeracao = None try: + logger.info("- Tentando obter modelo de sequência de numeração.") numeracao = sapl.base.models.AppConfig.objects.last( ).sequencia_numeracao - except AttributeError: + except AttributeError as e: + logger.error("- Erro ao obter modelo. " + str(e)) pass tipo = self.instance.tipo.tipo_conteudo_related @@ -1936,6 +2014,7 @@ class EtiquetaPesquisaForm(forms.Form): def clean(self): super(EtiquetaPesquisaForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -1948,12 +2027,15 @@ class EtiquetaPesquisaForm(forms.Form): # preencheu o Final, ou vice-versa if (not cleaned_data['data_inicial'] or not cleaned_data['data_final']): + logger.error("- Caso pesquise por data, os campos de Data Incial e " + "Data Final devem ser preenchidos obrigatoriamente") raise ValidationError(_( 'Caso pesquise por data, os campos de Data Incial e ' + 'Data Final devem ser preenchidos obrigatoriamente')) # Caso tenha preenchido, verifica se a data final é maior que # a inicial elif cleaned_data['data_final'] < cleaned_data['data_inicial']: + logger.error("- A Data Final não pode ser menor que a Data Inicial") raise ValidationError(_( 'A Data Final não pode ser menor que a Data Inicial')) @@ -1962,12 +2044,16 @@ class EtiquetaPesquisaForm(forms.Form): cleaned_data['processo_final']): if (not cleaned_data['processo_inicial'] or not cleaned_data['processo_final']): + logger.error("- Caso pesquise por número de processo, os campos de " + "Processo Inicial e Processo Final " + "devem ser preenchidos obrigatoriamente") raise ValidationError(_( 'Caso pesquise por número de processo, os campos de ' + 'Processo Inicial e Processo Final ' + 'devem ser preenchidos obrigatoriamente')) elif (cleaned_data['processo_final'] < cleaned_data['processo_inicial']): + logger.error("- O processo final não pode ser menor que o inicial") raise ValidationError(_( 'O processo final não pode ser menor que o inicial')) @@ -2009,6 +2095,7 @@ class FichaPesquisaForm(forms.Form): def clean(self): super(FichaPesquisaForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -2019,6 +2106,7 @@ class FichaPesquisaForm(forms.Form): return cleaned_data if cleaned_data['data_final'] < cleaned_data['data_inicial']: + logger.error("- A Data Final não pode ser menor que a Data Inicial.") raise ValidationError(_( 'A Data Final não pode ser menor que a Data Inicial')) @@ -2069,6 +2157,7 @@ class ExcluirTramitacaoEmLote(forms.Form): def clean(self): super(ExcluirTramitacaoEmLote, self).clean() + logger = logging.getLogger(__name__) cleaned_data = self.cleaned_data @@ -2085,6 +2174,7 @@ class ExcluirTramitacaoEmLote(forms.Form): unidade_tramitacao_destino=unidade_tramitacao_destino, status=status) if not tramitacao_set.exists(): + logger.error("- Não existem tramitações com os dados informados.") raise forms.ValidationError( _("Não existem tramitações com os dados informados.")) diff --git a/sapl/norma/forms.py b/sapl/norma/forms.py index afcc052cd..8305bf2f8 100755 --- a/sapl/norma/forms.py +++ b/sapl/norma/forms.py @@ -1,5 +1,6 @@ import django_filters +import logging from crispy_forms.helper import FormHelper from crispy_forms.layout import Fieldset, Layout from django import forms @@ -128,6 +129,7 @@ class NormaJuridicaForm(ModelForm): def clean(self): + logger = logging.getLogger(__name__) cleaned_data = super(NormaJuridicaForm, self).clean() if not self.is_valid(): @@ -143,12 +145,17 @@ class NormaJuridicaForm(ModelForm): cleaned_data['numero_materia'] and cleaned_data['ano_materia']): try: + logger.info("- Tentando obter objeto MateriaLegislativa.") materia = MateriaLegislativa.objects.get( tipo_id=cleaned_data['tipo_materia'], numero=cleaned_data['numero_materia'], ano=cleaned_data['ano_materia']) except ObjectDoesNotExist: + logger.error("- Matéria Legislativa %s/%s (%s) é inexistente." % ( + self.cleaned_data['numero_materia'], + self.cleaned_data['ano_materia'], + cleaned_data['tipo_materia'].descricao)) raise forms.ValidationError( _("Matéria Legislativa %s/%s (%s) é inexistente." % ( self.cleaned_data['numero_materia'], @@ -164,14 +171,18 @@ class NormaJuridicaForm(ModelForm): data = cleaned_data['data'] if data.year != ano: + logger.error("O ano da norma é diferente " + "do ano no campo data") raise ValidationError("O ano da norma não pode ser " "diferente do ano no campo data") return cleaned_data def clean_texto_integral(self): + logger = logging.getLogger(__name__) texto_integral = self.cleaned_data.get('texto_integral', False) if texto_integral and texto_integral.size > MAX_DOC_UPLOAD_SIZE: max_size = str(MAX_DOC_UPLOAD_SIZE / (1024 * 1024)) + logger.error("- Arquivo muito grande. ( > {0}MB )".format(max_size)) raise ValidationError( "Arquivo muito grande. ( > {0}MB )".format(max_size)) return texto_integral @@ -194,12 +205,14 @@ class AnexoNormaJuridicaForm(ModelForm): } def clean(self): + logger = logging.getLogger(__name__) cleaned_data = super(AnexoNormaJuridicaForm, self).clean() if not self.is_valid(): return cleaned_data anexo_arquivo = self.cleaned_data.get('anexo_arquivo', False) if anexo_arquivo and anexo_arquivo.size > MAX_DOC_UPLOAD_SIZE: max_size = str(MAX_DOC_UPLOAD_SIZE / (1024 * 1024)) + logger.error("- Arquivo muito grande. ( > {0}MB )".format(max_size)) raise ValidationError( "Arquivo muito grande. ( > {0}MB )".format(max_size)) return cleaned_data @@ -239,17 +252,20 @@ class NormaRelacionadaForm(ModelForm): def clean(self): super(NormaRelacionadaForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data cleaned_data = self.cleaned_data try: + logger.info("- Tentando obter objeto NormaJuridica. ") norma_relacionada = NormaJuridica.objects.get( numero=cleaned_data['numero'], ano=cleaned_data['ano'], tipo=cleaned_data['tipo']) except ObjectDoesNotExist: + logger.error("- A norma a ser relacionada não existe.") msg = _('A norma a ser relacionada não existe.') raise ValidationError(msg) else: @@ -310,6 +326,7 @@ class NormaPesquisaSimplesForm(forms.Form): def clean(self): super(NormaPesquisaSimplesForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -321,12 +338,15 @@ class NormaPesquisaSimplesForm(forms.Form): if (data_inicial and data_final and data_inicial > data_final): + logger.error("- Data Final menor que a Data Inicial") raise ValidationError(_( 'A Data Final não pode ser menor que a Data Inicial')) else: condicao1 = data_inicial and not data_final condicao2 = not data_inicial and data_final if condicao1 or condicao2: + logger.error("- Caso pesquise por data, os campos de Data Inicial e " + "Data Final devem ser preenchidos obrigatoriamente") raise ValidationError(_('Caso pesquise por data, os campos de Data Inicial e ' + 'Data Final devem ser preenchidos obrigatoriamente')) diff --git a/sapl/norma/views.py b/sapl/norma/views.py index 2cb4455c9..c632997c2 100755 --- a/sapl/norma/views.py +++ b/sapl/norma/views.py @@ -1,5 +1,6 @@ import re +import logging from django.contrib.auth.mixins import PermissionRequiredMixin from django.core.exceptions import ObjectDoesNotExist @@ -204,11 +205,14 @@ class NormaCrud(Crud): return self.search_url def get_initial(self): + logger = logging.getLogger(__name__) try: + logger.info('- Tentando obter objeto de modelo da esfera da federação.') esfera = sapl.base.models.AppConfig.objects.last( ).esfera_federacao self.initial['esfera_federacao'] = esfera except: + logger.error('- Erro ao obter objeto de modelo da esfera da federação.') pass self.initial['complemento'] = False return self.initial @@ -240,17 +244,20 @@ class NormaCrud(Crud): def recuperar_norma(request): + logger = logging.getLogger(__name__) tipo = TipoNormaJuridica.objects.get(pk=request.GET['tipo']) numero = request.GET['numero'] ano = request.GET['ano'] try: + logger.info('- Tentando obter norma.') norma = NormaJuridica.objects.get(tipo=tipo, ano=ano, numero=numero) response = JsonResponse({'ementa': norma.ementa, 'id': norma.id}) except ObjectDoesNotExist: + logger.error('- Norma buscada não existe. Definida com ementa vazia e id 0.') response = JsonResponse({'ementa': '', 'id': 0}) return response diff --git a/sapl/static/styles/app.css b/sapl/static/styles/app.css new file mode 100755 index 000000000..401c3707b --- /dev/null +++ b/sapl/static/styles/app.css @@ -0,0 +1,494 @@ +@charset "UTF-8"; +.logo img { + width: 40px; + height: 40px; + margin: 5px 15px; } + +.vcenter { + display: inline-block; + vertical-align: middle; + float: none; + padding: 10px; } + +nav.navbar { + border-radius: 0; + font-size: 15px; } + +nav .navbar-nav > li > a { + padding-top: 0px; + padding-bottom: 0px; + line-height: 75px; } + nav .navbar-nav > li > a:hover { + background-color: #23527c; } + +nav .navbar-nav > li:nth-child(2) > .dropdown-menu { + right: auto; } + +nav .navbar-nav:last-child > li:last-child a { + padding-right: 0px; } + +.masthead { + padding: 10px; } + .masthead .nav { + clear: both; } + .masthead .navbar-brand { + color: inherit; + font-size: 24px; } + .masthead .navbar-brand img.img-responsive { + height: 95px; + margin-right: 15px; } + .masthead .navbar-brand small { + color: #93A4AA; + font-size: 75%; + line-height: 25px; } + +.navbar { + margin-bottom: 0; } + +.navbar-brand { + padding: 0px; } + +h1, .h1 { + font-size: 30px; } + +h2, .h2 { + font-size: 24px; } + +h3, .h3 { + font-size: 20px; } + +h4, .h4 { + font-size: 16px; } + +h5, .h5 { + font-size: 14px; } + +h6, .h6 { + font-size: 12px; } + +.page-header { + margin: 20px 0px 10px; } + +.btn:hover, .btn:focus { + color: inherit; } + +.caret { + /* Por padrão caret aponta para baixo*/ } + .caret.top { + transform: rotate(180deg); } + +.btn-default.btn-excluir { + color: #d9534f; } + .btn-default.btn-excluir:hover { + color: #fff; + border-color: #de6764; + background-color: #de6764; } + +.controls-file { + padding: 10px; + border: 1px solid #d6e1e5; + border-radius: 4px; } + .controls-file label.checkbox-inline { + margin: 0px; + display: block; } + +.help-block-danger { + margin: 15px; + padding: 15px; + border: 2px dashed #f00; } + +.controls-radio-checkbox { + padding: 0px; + border: 1px solid #d6e1e5; + border-radius: 4px; + min-height: 20px; } + .controls-radio-checkbox .help-block { + margin: 15px; + padding: 15px; + border: 2px dashed #d6e1e5; } + .controls-radio-checkbox label { + padding: 5px; } + .controls-radio-checkbox label .icons { + top: 5px; + left: 8px; } + .controls-radio-checkbox label.checkbox-inline, .controls-radio-checkbox label.radio-inline { + padding: 8px; + padding-left: 36px; } + .controls-radio-checkbox label.checkbox-inline .icons, .controls-radio-checkbox label.radio-inline .icons { + top: 8px; + left: 8px; } + .controls-radio-checkbox .checkbox, .controls-radio-checkbox .radio, .controls-radio-checkbox .checkbox-inline, .controls-radio-checkbox .radio-inline { + margin: 0; } + .controls-radio-checkbox .checkbox:hover, .controls-radio-checkbox .radio:hover, .controls-radio-checkbox .checkbox-inline:hover, .controls-radio-checkbox .radio-inline:hover { + background-color: #d6e1e5; } + +p.control-label { + font-weight: bold; } + +.legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: inherit; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; + clear: both; } + +.grid-gutter-width-right { + margin-right: 15px; } + +html { + position: relative; + min-height: 100%; } + +body { + margin-bottom: 160px; } + +.footer { + position: absolute; + bottom: 0; + width: 100%; + /* Set the fixed height of the footer here */ + height: 140px; + background: #364347 none repeat scroll 0% 0%; + color: white; + text-align: center; } + .footer p { + color: white; + margin-top: 10px; } + .footer .container { + padding-top: 25px; } + +label { + margin-bottom: 0; + line-height: 1; } + +.control-label { + margin: 0; } + +.form-control-static { + padding-top: 0; + min-height: auto; } + .form-control-static img { + max-width: 100%; } + +.pagination { + padding-top: 25px; } + +.modal .alert { + margin-bottom: 0; } + +fieldset fieldset { + font-size: 95%; } + fieldset fieldset legend { + font-size: 18px; } + +.avatar-parlamentar { + height: 128px; + width: 128px; + margin: 0 auto; + display: table; } + +/* INDEX */ +#conteudo { + position: relative; + padding: 2em 1.5em 1.5em 1.5em; + overflow: hidden; + font-size: 100%; + text-align: left; + min-height: 350px; + max-width: 1000px; + margin: 0 auto; } + +#conteudo a:hover { + color: #444; + -webkit-transition: 0.3s ease-in; + -moz-transition: 0.3s ease-in; + -o-transition: 0.3s ease-in; } + +#homeIndex { + text-align: center; } + +.homeBanner span { + color: white; + font-size: 32px; + font-weight: 600; + display: inline-block; + vertical-align: middle; + padding: 2px 45px 4px; + border: 2px solid; } + +.homeBanner::after { + display: inline-block; + vertical-align: middle; + height: 100%; } + +.homeBlock { + display: inline-block; + position: relative; + background-color: #F3F3F3; + width: 190px; + height: 260px; + margin: 3px; + text-align: center; + font-size: 0; + overflow: hidden; } + +.homeBlock > a { + display: block; + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; } + +.homeBlock::after { + content: ''; + display: inline-block; + vertical-align: middle; + height: 100%; + overflow: visible; + clear: none; + visibility: initial; } + +.homeContent { + position: relative; + padding: 10px; + text-align: justify; + font-size: 14px; + color: #FFF; + opacity: 0; + transition: opacity 0.5s ease; + display: inline-block; + vertical-align: middle; } + +.homeContent p { + display: block; + line-height: 13px; + font-size: 80%; + color: white; } + +.homeIcon { + position: relative; + display: inline-block; + width: 105px; + height: 105px; + border-radius: 50%; + background: #364347; + z-index: 1; } + +.homeIcon::before { + content: ''; + position: absolute; + width: 100%; + height: 100%; + border-radius: 50%; + background: #364347; + top: 0; + left: 0; + transform: scale(0.95); + transition: transform 0.6s ease; } + +.homeIcon img { + position: absolute; + margin: auto; + top: 0; + bottom: 0; + right: 0; + left: 0; + transition: opacity 0.4s 0.4s ease; } + +.homeFront { + position: absolute; + top: 46%; + width: 100%; + font-size: 0; + transform: translateY(-60%); } + +.homeFront h2 { + position: absolute; + margin-top: 18px; + font-size: 22px; + font-weight: 700; + color: #595959 !important; + width: 100%; + padding: 0 6%; + z-index: 0; } + +.homeTitle { + display: block; + height: 32px; + text-align: center; + width: 100%; + opacity: 0; + transition: opacity 0.4s ease; } + +.homeTitle::before { + content: ''; + display: inline-block; + vertical-align: middle; + height: 100%; } + +.homeTitle h2 { + display: inline-block; + vertical-align: middle; + max-width: 110px; + font-size: 14px; + color: white !important; + line-height: 1em; } + +.homeTitle img { + display: inline-block; + vertical-align: middle; + height: 30px; + margin-right: 5px; } + +.homeBlock:hover .homeIcon::before { + transform: scale(3.6) translateY(7px); } + +.homeBlock:hover .homeContent { + opacity: 1; + transition-delay: 0.2s; } + +.homeBlock:hover .homeIcon img { + opacity: 0; + transition-duration: 0.2s; + transition-delay: 0s; } + +.homeBlock:hover .homeTitle { + opacity: 1; } + +h1, h2, h3, h4, h5, h6, form, dl, dt, dd, p, div, img, a { + margin: 0; + padding: 0; } + +p { + margin: 0.5em 0; } + +/* FIM INDEX */ +/* TEMPLATE AJUDA */ +.manual li { + display: list-item; + line-height: 1.5em; + padding-right: 0; } + +.manual li a { + background-color: transparent; + border: none; + border-radius: none; + padding: 0; } + +.manual, .manual ul { + padding-left: 1.5em; + list-style-type: none; + margin-top: 0; + font-size: 100%; } + +/* FIM TEMPLATE AJUDA */ +.container-tabaux .sidebar-tabaux { + background: #fafafa; + margin-top: -70px; + padding: 10px; + border: 1px solid #eee; } + .container-tabaux .sidebar-tabaux .navbar-right { + margin: 0; } + .container-tabaux .sidebar-tabaux .nav-pills > li + li { + margin-left: 0px; } + .container-tabaux .sidebar-tabaux li { + width: 100%; } + .container-tabaux .sidebar-tabaux span { + display: none; } + .container-tabaux .sidebar-tabaux .dropdown-menu { + padding: 0px; + right: 10px; + margin-top: -5px; + overflow: hidden; } + .container-tabaux .sidebar-tabaux .dropdown-menu a { + border: 0px; } + +.container-tabaux ul { + list-style: none; + padding: 0; } + +.container-tabaux .list { + font-family: "SourceSansProSemiBold", Helvetica, Arial, sans-serif; + font-size: 0px; + display: table; + width: 100%; + margin: 0; } + .container-tabaux .list ul { + display: table; + width: 100%; + margin: 0; } + .container-tabaux .list li { + width: calc(50%); + display: inline-block; + position: relative; } + .container-tabaux .list > li { + width: 100%; + border-bottom: 1px solid #eee; + padding-bottom: 20px; + margin-bottom: 20px; } + .container-tabaux .list .head_title { + color: #364347; + font-size: 2.4rem; + text-transform: none; } + .container-tabaux .list a span { + display: none; } + +.btn-cancel-iframe { + position: relative; + text-align: right; + opacity: 0.5; } + .btn-cancel-iframe:hover { + opacity: 1; } + .btn-cancel-iframe a { + padding: 10px; + display: inline-block; } + +@media (max-width: 1199px) { + .masthead .navbar-brand { + font-size: 22px; } + .masthead .navbar-brand img.img-responsive { + height: 60px; + width: 60px; + margin-right: 7.5px; } + .navbar-nav > li > a { + padding-left: 10.71429px; + padding-right: 10.71429px; } } + +@media (max-width: 1091px) { + .navbar-nav > li > a { + padding-left: 7.5px; + padding-right: 7.5px; } } + +@media (min-width: 1092px) and (max-width: 1199px) { + .container { + width: 1070px; } } + +@media print { + a[href]:after { + content: none !important; } } + +/* Estilização da Listagem de Votos em sessões plenárias */ +#styleparlamentar { + border: 0px solid #d6e1e5; + border-top-color: #d6e1e5; + border-right-color: #d6e1e5; + border-bottom-color: #d6e1e5; + border-left-color: #d6e1e5; + border-image-source: initial; + border-image-slice: initial; + border-image-repeat: initial; + font-size: 16px; + line-height: 1.467; + padding: 7px 12px; + height: 40px; + -webkit-appearance: none; + border-radius: 4px; + -webkit-box-shadow: none; + box-shadow: none; + margin-left: 1.0em; } diff --git a/sapl/static/styles/compilacao.css b/sapl/static/styles/compilacao.css new file mode 100755 index 000000000..557ef057a --- /dev/null +++ b/sapl/static/styles/compilacao.css @@ -0,0 +1,1136 @@ +a:link:after, a:visited:after { + content: ""; } + +.test_import:nth-child(even) { + background-color: #ccc; } + +#wait_message { + display: block; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(220, 220, 220, 0.75); + z-index: 99; } + #wait_message #msg { + position: relative; + margin: 20% auto; + padding: 1.2em 2em; + max-width: 600px; + text-align: center; + font-size: 1.5em; + color: #677; + border: 1px solid #eee; + background-color: #fff !important; + box-shadow: 0 1px 2px #999; } + +.text-center { + text-align: center; } + +.cp-notify { + z-index: 9999; + position: fixed; + top: 2em; + left: 50%; + min-width: 600px; + transform: translate(-50%, 0); + transition: all 0.4s ease; + opacity: 0.97; } + .cp-notify.hide { + opacity: 0; + top: -1000px; + display: block !important; + transition: all 0.4s ease; } + .cp-notify .message { + padding: 1em; + border: 2px solid rgba(0, 0, 0, 0.1); + border-radius: 4px; + color: rgba(0, 0, 0, 0.6); + line-height: 1em; + font-size: 1.3em; + text-align: center; + box-shadow: 0 0 100px rgba(0, 0, 0, 0.2); } + +.cp { + /* and dpt */ } + .cp .desativado .dtxt, .cp .dpt .dptt > a.desativado .dtxt, .cp .desativado .dtxt *, .cp .dpt .dptt > a.desativado .dtxt *, .cp .desativado .dpt-link, .cp .dpt .dptt > a.desativado .dpt-link, .cp .desativado .dpt-link *, .cp .dpt .dptt > a.desativado .dpt-link * { + text-decoration: line-through; + color: #999 !important; } + .cp .desativado .dtxt table, .cp .dpt .dptt > a.desativado .dtxt table, .cp .desativado .dtxt table td, .cp .dpt .dptt > a.desativado .dtxt table td, .cp .desativado .dtxt * table, .cp .dpt .dptt > a.desativado .dtxt * table, .cp .desativado .dtxt * table td, .cp .dpt .dptt > a.desativado .dtxt * table td, .cp .desativado .dpt-link table, .cp .dpt .dptt > a.desativado .dpt-link table, .cp .desativado .dpt-link table td, .cp .dpt .dptt > a.desativado .dpt-link table td, .cp .desativado .dpt-link * table, .cp .dpt .dptt > a.desativado .dpt-link * table, .cp .desativado .dpt-link * table td, .cp .dpt .dptt > a.desativado .dpt-link * table td { + border: 1px dotted #ccc; } + .cp a { + text-decoration: none; + cursor: pointer; } + .cp .diff .desativado, .cp .diff .dpt .dptt > a.desativado, .cp .dpt .diff .dptt > a.desativado, .cp .diff .desativado *, .cp .diff .dpt .dptt > a.desativado *, .cp .dpt .diff .dptt > a.desativado * { + text-decoration: line-through; + color: #ddd !important; + font-size: 90%; } + .cp .diff .added { + color: #04DE2C; } + .cp .dpt { + font-size: 1em; + position: relative; } + .cp .dpt.indent { + padding-left: 1em; } + .cp .dpt .ementa { + padding: 2em 0em 2em 35%; + font-weight: bold; } + .cp .dpt .titulo_generico, .cp .dpt .anexo, .cp .dpt .disp_preliminares, .cp .dpt .disp_gerais, .cp .dpt .disp_transitorias, .cp .dpt .disp_finais, .cp .dpt .parte, .cp .dpt .livro, .cp .dpt .titulo, .cp .dpt .capitulo, .cp .dpt .secao, .cp .dpt .subsecao, .cp .dpt .itemsecao { + text-align: center; + margin-bottom: 1em; + font-size: 1.15em; + margin-top: 3em; } + .cp .dpt .titulo { + margin-top: 2em; } + .cp .dpt .capitulo { + margin-top: 1.5em; + font-size: 1.15em; } + .cp .dpt .secao { + margin-top: 1.2em; + margin-bottom: 0.7em; + font-weight: bold; + font-size: 1.15em; } + .cp .dpt .subsecao, + .cp .dpt .itemsecao { + margin-top: 1em; + margin-bottom: 0.6em; + font-weight: bold; + font-size: 1.15em; } + .cp .dpt .artigo { + font-size: 1.15em; + float: left; } + .cp .dpt .artigo .dptt { + position: relative; } + .cp .dpt .caput { + margin-top: 0.3333em; + font-size: 1.15em; } + .cp .dpt .paragrafo { + font-size: 1.1em; + margin-top: 0.2222em; } + .cp .dpt .inciso { + font-size: 1.1em; + margin-top: 0.1667em; } + .cp .dpt .alinea { + font-size: 1.0em; + margin-top: 2px; } + .cp .dpt .item { + font-size: 1.0em; + margin-top: 2px; } + .cp .dpt .assinatura { + margin-top: 0.6em; + font-size: 1.15em; } + .cp .dpt .fecho_lei { + margin-top: 0.6em; + font-size: 1.15em; } + .cp .dpt .page-break { + page-break-before: always; } + .cp .dpt .bloco_alteracao { + padding-left: 10%; + font-style: italic; + color: #018; } + .cp .dpt .bloco_alteracao a { + text-decoration: underline; } + .cp .dpt .bloco_alteracao a, .cp .dpt .bloco_alteracao table, .cp .dpt .bloco_alteracao table td { + color: #018 !important; } + .cp .dpt .dn { + /* Notas de Dispositivo*/ + font-weight: normal; + position: relative; + font-size: 70%; } + .cp .dpt .dn p, .cp .dpt .dn ul { + font-weight: normal; + margin: 0 0 0 0; + list-style: none; + padding: 0; } + .cp .dpt .dn .dnl { + /* Lista Notas de Dispositivo*/ + display: block; + text-align: left !important; } + .cp .dpt .dn .dnl * { + display: inline; } + .cp .dpt .dn .dnl .bullet { + padding: 0 0.333em; + display: inline-block; } + .cp .dpt .dn .dnl .dnli { + min-height: 2.5em; } + .cp .dpt .dn .dnl .dnli:hover ul { + transition: opacity 0.5s linear, clip 0s 0.3s; + clip: auto; + opacity: 1; + background: rgba(230, 230, 230, 0.9); } + .cp .dpt .dn .dnl .dnli ul { + transition: opacity 0.5s linear, clip 0s 0.3s; + clip: rect(0, 0, 0, 0); + opacity: 0; + position: absolute; + background: transparent; + right: 0; + padding: 0.2em 0.5em 0em 0.5em; + border: 1px solid #c7e3d3; + border-top: 0px; + font-size: 1.5rem; } + .cp .dpt .dn .dnl .dnli ul li { + display: table-cell; + color: #aaa; } + .cp .dpt .dn .dnl .dnli ul li:hover { + color: #787; } + .cp .dpt .dn .dnl .dnli ul li:hover a { + color: #27AE60 !important; } + .cp .dpt .dn .dnl .dnli ul li .nowner { + color: #27AE60 !important; } + .cp .dpt .dn .dnl .dnli .ntitulo { + font-weight: bold; + color: #03A203; + text-decoration: none; } + .cp .dpt .dn .dnl .dnli .ntitulo a { + color: #294 !important; } + .cp .dpt .dn .dnl .dnli .ntexto { + color: #06D806; } + .cp .dpt .dn .dnl .dnli .ntexto a { + color: #03A203 !important; } + .cp .dpt .dn .dnl:hover { + display: block; } + .cp .dpt .dn .dnl:hover * { + display: block; } + .cp .dpt .dn .dnl:hover > .bullet { + display: none; } + .cp .dpt .dn .dnl:hover .dnli { + margin-top: 0.5em; + border-top: 1px solid #c7e3d3; } + .cp .dpt .dptt { + clear: left; } + .cp .dpt .dptt > a { + color: #000000; } + .cp .dpt .dptt > a.nota-alteracao { + color: #02baf2; + font-size: 0.75em; } + .cp .dpt .dptt > a.nota-alteracao:hover { + text-decoration: underline; } + .cp .dpt .dptt .dne { + position: absolute; + display: block; + right: 0; + left: 0; + top: 0; + height: 0; + transform: scaleX(0); + transform-origin: right; + transition: all 0.3s ease; + border-top: 1px solid #2980B9; } + .cp .dpt .dptt .dne ul.btns-action { + list-style: none; + padding: 0; + position: absolute; + right: 0; + background-color: #2980B9; } + .cp .dpt .dptt .dne ul.btns-action li { + float: left; } + .cp .dpt .dptt .dne ul.btns-action li:hover { + background-color: rgba(0, 0, 0, 0.1); } + .cp .dpt .dptt .dne ul.btns-action li a { + color: white; + padding: 0.15em 1em 0; + display: inline-block; } + .cp .dpt .dptt .dne-nota { + position: relative; + transform: scaleX(1); + height: auto; + border-top: 0px; } + .cp .dpt .dptt .dne-nota ul.btns-action { + display: none; } + .cp .dpt .dptt .dne-nota .dne-form { + margin: 1em -2em 0em; + text-align: left; + font-size: 1.6rem; } + .cp .dpt .dptt:hover .dne { + height: 0.1667rem; + transform: scaleX(1); + transition-delay: 1s; } + .cp .dpt .dptt:hover .dne-nota { + height: auto; + transition-delay: 0s; } + .cp .tipo-vigencias { + list-style: none; + position: fixed; + bottom: 0px; + left: 50%; + transform: translate(-50%, 0); + margin: 0; + padding: 0; + background-color: #2980B9; + z-index: 1000; + opacity: 0.9; + transition: all 0.3s ease-in-out; } + .cp .tipo-vigencias li { + display: inline-block; + border-left: 1px solid #fff; + float: left; } + .cp .tipo-vigencias li a { + color: white; + padding: 0.3em 1em 0; + display: inline-block; + font-size: 110%; + cursor: pointer; } + .cp .tipo-vigencias li a.selected { + background-color: rgba(0, 0, 0, 0.5); } + .cp .tipo-vigencias li:hover { + background-color: rgba(0, 0, 0, 0.2); } + .cp .tipo-vigencias:hover { + opacity: 1; } + +/* end cp */ +.cp.cpe { + /* fim .dpt */ + /* fim dpt-alts */ } + .cp.cpe .desativado, .cp.cpe .dpt .dptt > a.desativado { + text-decoration: line-through; + color: #999 !important; } + .cp.cpe .desativado table, .cp.cpe .dpt .dptt > a.desativado table, .cp.cpe .desativado table td, .cp.cpe .dpt .dptt > a.desativado table td { + border: 1px dotted #ccc; } + .cp.cpe .desativado a.nota-alteracao * { + color: #02baf2 !important; } + .cp.cpe .dpt { + display: block; } + .cp.cpe .dpt > .dpt-actions-fixed { + position: absolute; + right: -0.8em; + top: -0.8em; + z-index: 3; + opacity: 0; } + .cp.cpe .dpt > .dpt-actions-fixed .activate { + display: none; } + .cp.cpe .dpt > .dpt-actions-fixed .deactivate { + display: inline; } + .cp.cpe .dpt > .dpt-actions-fixed .btn-dpt-edit.btn-default { + color: #333; } + .cp.cpe .dpt > .dpt-actions-fixed .btn-dpt-edit.btn-default:hover { + color: #fff; + background-color: #02baf2; } + .cp.cpe .dpt > .dpt-actions, .cp.cpe .dpt > .dpt-actions-bottom { + display: none; } + .cp.cpe .dpt > .dpt-text { + cursor: text; + min-height: 30px; + border: 1px solid transparent; } + .cp.cpe .dpt > .dpt-text:hover, .cp.cpe .dpt > .dpt-text.hover-fixed { + background-color: rgba(0, 0, 0, 0.01); + color: #2980B9; + border: 1px solid #eee; + transition: color 0.3s ease; } + .cp.cpe .dpt > .dpt-text.artigo { + float: none; } + .cp.cpe .dpt > .dpt-text a.link-rotulo { + color: #000; } + .cp.cpe .dpt:hover > .dpt-actions-fixed { + opacity: 1; } + .cp.cpe .dpt:hover > .dpt-actions-fixed:hover ~ .dpt-text { + background-color: rgba(0, 0, 0, 0.01); + color: #2980B9; + border: 1px solid #eee; + transition: color 0.3s ease; } + .cp.cpe .dpt .semtexto { + font-weight: bold; + color: #9aaed6; } + .cp.cpe .dpt .semtexto:hover { + color: #5f76a4; } + .cp.cpe .dpt-alts { + margin: 0; + margin-bottom: 1em; + padding: 0; + background-color: transparent; + min-height: 100px; + border: 2px dashed #fff; } + .cp.cpe .dpt-alts:hover { + border-color: #d9ddde; } + .cp.cpe .dpt-alts:empty { + border-color: #ddd; } + .cp.cpe .dpt-alts.drag { + width: 100% !important; + border-color: #d9ddde; } + .cp.cpe .dpt-alts.drag .dpt { + transition-duration: 0s !important; } + .cp.cpe .dpt-alts .dpt { + width: 100% !important; + box-shadow: 0 -1px 0 #e5e5e5, 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.24); + padding: 0; + margin: 0; + background-color: #edf0f1; + height: auto !important; + min-height: 2em; + z-index: 1; } + .cp.cpe .dpt-alts .dpt:not(:first-child) { + border-top: 1px solid white; } + .cp.cpe .dpt-alts .dpt > .dpt-text { + padding: 0.3em 1em; + margin-top: 0; + margin-bottom: 0; } + .cp.cpe .dpt-alts .dpt > .dpt-text a.link-rotulo { + text-decoration: underline; } + .cp.cpe .dpt-alts .dpt-selected.dpt { + margin: 0em -0.5em; } + .cp.cpe .dpt-selected.dpt { + width: auto !important; + margin: 1em -0.5em; + border: 1px solid #fad46b !important; + padding: 0; + background-color: #fafafa; + border-radius: 3px; + z-index: 4; } + .cp.cpe .dpt-selected.dpt > .dpt-text { + border: 1px solid transparent; } + .cp.cpe .dpt-selected.dpt > .dpt-text:hover { + border: 1px solid transparent; + background-color: transparent; } + .cp.cpe .dpt-selected.dpt > .dpt-form { + margin-bottom: 0em; } + .cp.cpe .dpt-selected.dpt > .dpt-actions, .cp.cpe .dpt-selected.dpt > .dpt-actions-bottom { + display: table; + background-color: #e5e5e5; + padding: 1em; + margin-bottom: 0em; + width: 100%; } + .cp.cpe .dpt-selected.dpt > .dpt-actions > .btn-action, .cp.cpe .dpt-selected.dpt > .dpt-actions-bottom > .btn-action { + display: table-cell; + float: none; } + .cp.cpe .dpt-selected.dpt > .dpt-actions .btn-excluir, .cp.cpe .cp.cpe1_old_apagar .dpt-selected.dpt > .dpt-actions .csform .actions_inserts > li > a.btn-salvar, .cp.cpe1_old_apagar .cp.cpe .dpt-selected.dpt > .dpt-actions .csform .actions_inserts > li > a.btn-salvar, .cp.cpe .dpt-selected.dpt > .dpt-actions-bottom .btn-excluir, .cp.cpe .cp.cpe1_old_apagar .dpt-selected.dpt > .dpt-actions-bottom .csform .actions_inserts > li > a.btn-salvar, .cp.cpe1_old_apagar .cp.cpe .dpt-selected.dpt > .dpt-actions-bottom .csform .actions_inserts > li > a.btn-salvar { + display: inline-block; + opacity: 0.3; } + .cp.cpe .dpt-selected.dpt > .dpt-actions .btn-excluir:hover, .cp.cpe .cp.cpe1_old_apagar .dpt-selected.dpt > .dpt-actions .csform .actions_inserts > li > a.btn-salvar:hover, .cp.cpe1_old_apagar .cp.cpe .dpt-selected.dpt > .dpt-actions .csform .actions_inserts > li > a.btn-salvar:hover, .cp.cpe .dpt-selected.dpt > .dpt-actions-bottom .btn-excluir:hover, .cp.cpe .cp.cpe1_old_apagar .dpt-selected.dpt > .dpt-actions-bottom .csform .actions_inserts > li > a.btn-salvar:hover, .cp.cpe1_old_apagar .cp.cpe .dpt-selected.dpt > .dpt-actions-bottom .csform .actions_inserts > li > a.btn-salvar:hover { + opacity: 1; } + .cp.cpe .dpt-selected.dpt > .dpt-actions-bottom { + margin: 0; } + .cp.cpe .dpt-selected .dpt-block { + border-top: 1px solid #e5e5e5 !important; + opacity: 0.6; + transition: opacity 0.4s ease; } + .cp.cpe .dpt-selected .dpt-block:hover { + opacity: 1; } + .cp.cpe .dpt-selected .dpt:only-child { + /*border-bottom: 1px solid #e5e5e5 !important;*/ } + .cp.cpe .dpt-selected .dpt:not(:last-child) { + /*border-bottom: 1px solid #e5e5e5 !important;*/ } + .cp.cpe .dpt-selected .dpt-text { + opacity: 0.7; + margin: 0; + padding: 0.7em; } + .cp.cpe .dpt-selected .dpt-text:hover { + opacity: 1; + background-color: #f5f5f5; } + .cp.cpe .dpt-selected .dpt-alts { + margin: 1em; } + .cp.cpe .dpt-selected .dpt-alts .dpt { + box-shadow: 0 0 0; } + .cp.cpe .dpt-selected > .dpt-actions-fixed { + opacity: 1; + top: -12px; + right: 0.5em; } + .cp.cpe .dpt-selected > .dpt-actions-fixed .activate { + display: inline; } + .cp.cpe .dpt-selected > .dpt-actions-fixed .deactivate { + display: none; } + .cp.cpe .dpt-selected > .dpt-actions-fixed .btn-dpt-edit { + padding-top: 2px; + padding-bottom: 1px; } + .cp.cpe .dpt-selected > .dpt-actions-fixed .btn-dpt-edit.btn-default { + background-color: #fad46b; + border: 1px solid #fad46b; } + .cp.cpe .dpt-selected .dropdown-menu.dropdown-menu-left { + right: auto !important; + left: 0; + padding: 2px 0; } + .cp.cpe .dpt-selected .dropdown-menu.dropdown-menu-left > .top.arrow { + right: 88%; + left: auto; } + .cp.cpe .dpt-selected .dropdown-menu li a { + padding-top: 2px; + padding-bottom: 2px; } + .cp.cpe .dpt-selected .btn-group .radius-right { + border-bottom-right-radius: 4px !important; + border-top-right-radius: 4px !important; } + .cp.cpe .dpt-selected:hover > .dpt-actions-fixed { + opacity: 1; } + +.cp.cpe1_old_apagar { + margin-bottom: 15em; + /* fim dpt */ + /* fim dpt-selected */ } + .cp.cpe1_old_apagar .desativado, .cp.cpe1_old_apagar .dpt .dptt > a.desativado, .cp.cpe1_old_apagar .desativado *, .cp.cpe1_old_apagar .dpt .dptt > a.desativado * { + text-decoration: line-through; + color: #999 !important; } + .cp.cpe1_old_apagar .desativado table, .cp.cpe1_old_apagar .dpt .dptt > a.desativado table, .cp.cpe1_old_apagar .desativado table td, .cp.cpe1_old_apagar .dpt .dptt > a.desativado table td, .cp.cpe1_old_apagar .desativado * table, .cp.cpe1_old_apagar .dpt .dptt > a.desativado * table, .cp.cpe1_old_apagar .desativado * table td, .cp.cpe1_old_apagar .dpt .dptt > a.desativado * table td { + border: 1px dotted #ccc; } + .cp.cpe1_old_apagar a { + text-decoration: none; + cursor: pointer; } + .cp.cpe1_old_apagar .dpt { + position: relative; + display: block; } + .cp.cpe1_old_apagar .dpt .semtexto { + font-weight: bold; + color: #BFD1F6; } + .cp.cpe1_old_apagar .dpt .artigo { + float: none; } + .cp.cpe1_old_apagar .dpt .caput { + margin-top: 0; } + .cp.cpe1_old_apagar .dpt > .actions_right, .cp.cpe1_old_apagar .dpt-selected .csform .dpt > .actions_left { + color: #fff; + right: 0em; + position: absolute; + opacity: 0; + transition: all 0.4s ease-in-out; + z-index: 1000; } + .cp.cpe1_old_apagar .dpt > .actions_right a.btn-bloco, .cp.cpe1_old_apagar .dpt-selected .csform .dpt > .actions_left a.btn-bloco { + background-color: #3498db; + color: #ffffff !important; + padding: 8px 18px 6px; + display: inline-block; + line-height: 1; + float: right; } + .cp.cpe1_old_apagar .dpt > .actions_right a.btn-bloco:hover, .cp.cpe1_old_apagar .dpt-selected .csform .dpt > .actions_left a.btn-bloco:hover { + opacity: 1; + background-image: -webkit-linear-gradient(top, #1c81c4, #0b6dad); + background-image: -moz-linear-gradient(top, #1c81c4, #0b6dad); + background-image: -ms-linear-gradient(top, #1c81c4, #0b6dad); + background-image: -o-linear-gradient(top, #1c81c4, #0b6dad); + background-image: linear-gradient(to bottom, #1c81c4, #0b6dad); } + .cp.cpe1_old_apagar .dpt:hover > .actions_right, .cp.cpe1_old_apagar .dpt-selected .csform .dpt:hover > .actions_left { + opacity: 1; } + .cp.cpe1_old_apagar .dpt .bloco { + display: block; + clear: both; } + .cp.cpe1_old_apagar .dpt .bloco *:hover { + color: #27AE60; } + .cp.cpe1_old_apagar .dpt .bloco .de { + cursor: pointer; } + .cp.cpe1_old_apagar .dpt .articulacao { + border-top: 2px solid #e5e5e5; + margin: 2em 0; } + .cp.cpe1_old_apagar .dpt .bloco_alteracao { + margin: 1em 0; + padding: 0em; + background-color: transparent; + min-height: 100px; + border: 2px dashed #fff; } + .cp.cpe1_old_apagar .dpt .bloco_alteracao:hover { + border-color: #d9ddde; } + .cp.cpe1_old_apagar .dpt .bloco_alteracao.drag { + width: 100% !important; + border-color: #d9ddde; } + .cp.cpe1_old_apagar .dpt .bloco_alteracao.drag .dpt { + transition-duration: 0s !important; } + .cp.cpe1_old_apagar .dpt .bloco_alteracao .dpt { + width: 100% !important; + box-shadow: 0 -1px 0 #e5e5e5, 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.24); + padding: 0.3em 1em; + margin: 0; + background-color: #edf0f1; + z-index: 1; } + .cp.cpe1_old_apagar .dpt .bloco_alteracao .dpt:not(:first-child) { + border-top: 1px solid white; } + .cp.cpe1_old_apagar .dpt .bloco_alteracao .dpt.ui-draggable div { + cursor: pointer; } + .cp.cpe1_old_apagar .dpt .bloco_alteracao .dpt.dpt-comp-selected { + transition: all 0.3s ease; + width: auto !important; + margin: 2em -3.7em; + box-shadow: 0 0 6px rgba(0, 0, 0, 0.16), 0 6px 12px rgba(0, 0, 0, 0.32); } + .cp.cpe1_old_apagar .dpt-selected { + font-size: 1em; + border: 0px solid #CCC; + margin: 1em -1.8em 1em -1.8em; + padding: 2.2em 2.2em 1.6em 2.2em; + box-shadow: -4px 15px 15px rgba(0, 0, 0, 0.1), 0px 6px 6px rgba(0, 0, 0, 0.23); + background-image: -webkit-linear-gradient(top, #eaeaee, #ddd); + background-image: -moz-linear-gradient(top, #eaeaee, #ddd); + background-image: -ms-linear-gradient(top, #eaeaee, #ddd); + background-image: -o-linear-gradient(top, #eaeaee, #ddd); + background-image: linear-gradient(to bottom, #eaeaee, #ddd); + /* fim csform*/ } + .cp.cpe1_old_apagar .dpt-selected ul { + list-style: none; + margin: 0; + padding: 0; } + .cp.cpe1_old_apagar .dpt-selected .semtexto { + color: #999; } + .cp.cpe1_old_apagar .dpt-selected .bloco { + opacity: 0.5; } + .cp.cpe1_old_apagar .dpt-selected .bloco:hover { + opacity: 1; } + .cp.cpe1_old_apagar .dpt-selected .bloco a:hover { + background: transparent; } + .cp.cpe1_old_apagar .dpt-selected > .bloco { + opacity: 1; + margin: 1em; } + .cp.cpe1_old_apagar .dpt-selected .bloco_alteracao { + margin: 0; + padding: 1em; + border: 0 transparent; + background-image: -webkit-linear-gradient(top, #eaeaee, #ddd); + background-image: -moz-linear-gradient(top, #eaeaee, #ddd); + background-image: -ms-linear-gradient(top, #eaeaee, #ddd); + background-image: -o-linear-gradient(top, #eaeaee, #ddd); + background-image: linear-gradient(to bottom, #eaeaee, #ddd); } + .cp.cpe1_old_apagar .dpt-selected .bloco_alteracao:hover { + border-color: transparent; } + .cp.cpe1_old_apagar .dpt-selected .bloco_alteracao.drag { + width: 100% !important; } + .cp.cpe1_old_apagar .dpt-selected .bloco_alteracao.drag .dpt { + transition-duration: 0s !important; } + .cp.cpe1_old_apagar .dpt-selected .bloco_alteracao .dpt { + width: auto !important; + transition: all 0.3s ease; + background-color: white; } + .cp.cpe1_old_apagar .dpt-selected .bloco_alteracao .dpt:not(:first-child) { + border-top: 0px solid white; } + .cp.cpe1_old_apagar .dpt-selected > .dpt { + padding: 0; } + .cp.cpe1_old_apagar .dpt-selected > .dpt:last-child { + padding-bottom: 1em; } + .cp.cpe1_old_apagar .dpt-selected > .actions_right a.btn-bloco, .cp.cpe1_old_apagar .dpt-selected .csform .dpt-selected > .actions_left a.btn-bloco { + display: none; } + .cp.cpe1_old_apagar .dpt-selected .csform { + /* compilacao simple form */ + display: block; + clear: both; + z-index: 9; + position: static; + /* actions_inserts */ } + .cp.cpe1_old_apagar .dpt-selected .csform .btns-action { + -webkit-animation: fadeIn 1s ease-in-out; + -moz-animation: fadeIn 1s ease-in-out; + -o-animation: fadeIn 1s ease-in-out; + opacity: 1; + position: absolute; + display: table; + transition: all 0.4s ease-in-out; } + .cp.cpe1_old_apagar .dpt-selected .csform .btns-action a { + color: #16407c; + display: block; + background: transparent; + vertical-align: middle; + text-align: center; + font-weight: normal; + text-shadow: 0 0 10px rgba(0, 0, 0, 0.3); + padding: 0.33em 0.4em; } + .cp.cpe1_old_apagar .dpt-selected .csform .btns-action > li { + position: relative; + display: table-cell; + vertical-align: top; } + .cp.cpe1_old_apagar .dpt-selected .csform .btns-action > li:hover { + background-color: rgba(255, 255, 255, 0.5); } + .cp.cpe1_old_apagar .dpt-selected .csform .btns-action > li:hover > a { + text-shadow: 0 0 5px #777; + color: #0a5; } + .cp.cpe1_old_apagar .dpt-selected .csform .label_status { + position: absolute; + bottom: 0; + right: 0; + color: #889; + padding: 0.3em; + font-size: 80%; + text-align: right; + z-index: 15; + display: table; } + .cp.cpe1_old_apagar .dpt-selected .csform .label_status li { + display: table-cell; + padding: 0 0.5em; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_parents { + z-index: 11; + top: 0em; + left: 0em; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_parents a { + padding: 0.62em; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_parents div, .cp.cpe1_old_apagar .dpt-selected .csform .actions_parents li { + font-size: 80%; + display: table-cell; + vertical-align: middle; + border-right: 1px solid #CCC; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_parents div { + padding: 0 0.4em; + font-stretch: condensed; + font-variant: small-caps; + font-weight: bold; + text-shadow: 0 0 10px #fff; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_parents > li:hover a { + color: #16407c; + font-weight: normal; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_top, .cp.cpe1_old_apagar .dpt-selected .csform .actions_bottom { + top: 0em; + right: 0em; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_top a, .cp.cpe1_old_apagar .dpt-selected .csform .actions_bottom a { + padding-right: 1em; + padding-left: 1em; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_top li, .cp.cpe1_old_apagar .dpt-selected .csform .actions_bottom li { + display: table-cell; + vertical-align: middle; + border-left: 1px solid #CCC; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_bottom { + top: auto; + left: 0; + bottom: 0; + display: inline-block; + border-top: 1px solid #CCC; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_bottom a { + padding: 0 0.4em; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_bottom li { + border: 0px; + border-right: 1px solid #CCC; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_right, .cp.cpe1_old_apagar .dpt-selected .csform .actions_left { + top: 2.2em; + right: 0em; + bottom: 0; + display: block; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_right li, .cp.cpe1_old_apagar .dpt-selected .csform .actions_left li { + width: 2.2em; + display: block; + border-bottom: 1px solid #CCC; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_right li:first-child, .cp.cpe1_old_apagar .dpt-selected .csform .actions_left li:first-child { + border-top: 1px solid #CCC; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_left { + right: auto; + left: 0em; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts { + background: transparent; + position: relative; + z-index: 19; + display: table; + width: 100%; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li { + display: table-cell; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li:hover > a { + background-image: -webkit-linear-gradient(top, #1c81c4, #0b6dad); + background-image: -moz-linear-gradient(top, #1c81c4, #0b6dad); + background-image: -ms-linear-gradient(top, #1c81c4, #0b6dad); + background-image: -o-linear-gradient(top, #1c81c4, #0b6dad); + background-image: linear-gradient(to bottom, #1c81c4, #0b6dad); } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a { + background-image: -webkit-linear-gradient(top, #3498DB, #2980C9); + background-image: -moz-linear-gradient(top, #3498DB, #2980C9); + background-image: -ms-linear-gradient(top, #3498DB, #2980C9); + background-image: -o-linear-gradient(top, #3498DB, #2980C9); + background-image: linear-gradient(to bottom, #3498DB, #2980C9); + border-right: 1px solid #fff; + padding: 0.2em; + display: block; + color: white; + text-align: center; + white-space: nowrap; + /* btn-excluir */ } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a.btn-excluir, .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a.btn-salvar { + text-align: left; + background: #A70808; + color: #c99; + padding-left: 1.7em; + position: relative; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a.btn-excluir:hover, .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a.btn-salvar:hover { + background-color: #c70808; + color: #ecc; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a.btn-excluir::before, .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a.btn-salvar::before { + z-index: 20; + position: absolute; + background: url(/static/img/icon_delete_white.png) no-repeat 50% 50%; + content: ""; + top: 0; + left: 0; + display: block; + color: black; + margin-left: 0.4em; + height: 100%; + width: 2em; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a.btn-salvar { + background: #1f8b4d; + color: white; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a.btn-salvar:hover { + background: #2d9c5c; + color: white; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a.btn-salvar::before { + background: url(/static/img/icon_save_white.png) no-repeat 50% 50%; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a span { + padding: 0 0.7em; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li:last-child > a { + border-right: 0px solid #fff; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > ul li:nth-child(even) a { + background: #3385CA; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > ul li a { + border-right: 1px solid #fff; + display: block; + color: white; + background: #2980C9; + font-size: 80%; + padding: 0.23em 1em; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > ul li a:hover { + background: #0a5ea4; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.add_prior { + table-layout: fixed; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.add_prior > ul { + transform: translateY(30px); + transition: transform 0.1s linear, opacity 0.1s linear, clip 0s 0.3s; + clip: rect(0, 0, 0, 0); + opacity: 0; + position: absolute; + margin-left: 0.5em; + box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.19), 0px 2px 6px rgba(0, 0, 0, 0.23); + -webkit-transition-delay: 0.4s; + /* Safari */ + transition-delay: 0.4s; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.add_prior > ul li a { + border-right: 0px !important; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.add_prior > ul li:first-child::before { + border-width: 0.375rem; + border-style: inset inset solid; + content: ""; + display: block; + height: 0px; + width: 0px; + border-color: transparent transparent #3385CA; + position: absolute; + top: -0.71rem; + left: 0.9375rem; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.add_prior > ul li:first-child:hover::before { + border-color: transparent transparent #0A5EA4; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.add_prior > ul::after { + content: ""; + position: absolute; + z-index: -1; + left: 0; + top: rem-calc(-25px); + height: rem-calc(25px); + width: 100%; + transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1); } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.add_prior:hover > ul { + transform: translateY(7px); + transition: transform 0.4s linear, opacity 0.4s linear, clip 0s 0.2s; + opacity: 1; + clip: rect(-100px, 2000px, 2000px, -100px); } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.menu_excluir { + display: block; + position: static; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.menu_excluir > ul { + transform: translateY(30px); + transition: transform 0.1s linear, opacity 0.1s linear, clip 0s 0.3s; + clip: rect(0, 0, 0, 0); + opacity: 0; + position: absolute; + margin-left: 0.5em; + box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.19), 0px 2px 6px rgba(0, 0, 0, 0.23); + -webkit-transition-delay: 0.4s; + /* Safari */ + transition-delay: 0.4s; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.menu_excluir > ul li a { + border-right: 0px !important; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.menu_excluir > ul li:first-child::before { + border-width: 0.375rem; + border-style: inset inset solid; + content: ""; + display: block; + height: 0px; + width: 0px; + border-color: transparent transparent #3385CA; + position: absolute; + top: -0.71rem; + left: 0.9375rem; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.menu_excluir > ul li:first-child:hover::before { + border-color: transparent transparent #0A5EA4; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.menu_excluir > ul::after { + content: ""; + position: absolute; + z-index: -1; + left: 0; + top: rem-calc(-25px); + height: rem-calc(25px); + width: 100%; + transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1); } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.menu_excluir:hover > ul { + transform: translateY(7px); + transition: transform 0.4s linear, opacity 0.4s linear, clip 0s 0.2s; + opacity: 1; + clip: rect(-100px, 2000px, 2000px, -100px); } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.menu_excluir > ul { + right: 0.5em; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.menu_excluir > ul li a { + background-color: #A70808; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.menu_excluir > ul li a:hover { + background: #c70808; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.menu_excluir > ul li:first-child::before { + border-color: transparent transparent #A70808; + right: 10%; + left: auto; } + .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li.menu_excluir > ul li:first-child:hover::before { + border-color: transparent transparent #c70808; } + .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante, .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante_fixo { + z-index: 2000; } + .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante > li > ul, .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante_fixo > li > ul { + transform: translateY(30px); + transition: transform 0.1s linear, opacity 0.1s linear, clip 0s 0.3s; + clip: rect(0, 0, 0, 0); + opacity: 0; + position: absolute; + margin-left: 0.5em; + box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.19), 0px 2px 6px rgba(0, 0, 0, 0.23); + -webkit-transition-delay: 0.4s; + /* Safari */ + transition-delay: 0.4s; } + .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante > li > ul li a, .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante_fixo > li > ul li a { + border-right: 0px !important; } + .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante > li > ul li:first-child::before, .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante_fixo > li > ul li:first-child::before { + border-width: 0.375rem; + border-style: inset inset solid; + content: ""; + display: block; + height: 0px; + width: 0px; + border-color: transparent transparent #3385CA; + position: absolute; + top: -0.71rem; + left: 0.9375rem; } + .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante > li > ul li:first-child:hover::before, .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante_fixo > li > ul li:first-child:hover::before { + border-color: transparent transparent #0A5EA4; } + .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante > li > ul::after, .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante_fixo > li > ul::after { + content: ""; + position: absolute; + z-index: -1; + left: 0; + top: rem-calc(-25px); + height: rem-calc(25px); + width: 100%; + transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1); } + .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante > li:hover > ul, .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante_fixo > li:hover > ul { + transform: translateY(7px); + transition: transform 0.4s linear, opacity 0.4s linear, clip 0s 0.2s; + opacity: 1; + clip: rect(-100px, 2000px, 2000px, -100px); } + .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante > li.menu_excluir > ul li:first-child::before, .cp.cpe1_old_apagar .dpt-selected .csform .menu_flutuante_fixo > li.menu_excluir > ul li:first-child::before { + right: auto; + left: 0.9375rem; } + .cp.cpe1_old_apagar .dpt-selected .csform textarea { + margin: 0; + resize: vertical; + min-height: 12.6em; + border: 0px; + font-size: 120%; + width: 100%; } + .cp.cpe1_old_apagar .dpt-selected .csform textarea:focus { + background: #fff; } + .cp.cpe1_old_apagar .dpt-selected .csform textarea::-webkit-input-placeholder { + color: #c70808; + opacity: 0.6; + font-size: 80%; } + .cp.cpe1_old_apagar .dpt-selected .csform textarea:-moz-placeholder { + /* Firefox 18- */ + color: #c70808; } + .cp.cpe1_old_apagar .dpt-selected .csform textarea::-moz-placeholder { + /* Firefox 19+ */ + color: #c70808; } + .cp.cpe1_old_apagar .dpt-selected .csform textarea:-ms-input-placeholder { + color: #c70808; + opacity: 0.6; } + .cp.cpe1_old_apagar .selected { + background-color: rgba(255, 255, 255, 0.5); } + .cp.cpe1_old_apagar .selected a:hover { + color: #16407c !important; + font-weight: normal !important; } + +.result-busca-dispositivo, .lista-dispositivo { + padding: 0 0 1em; + min-height: 3em; } + .result-busca-dispositivo ul, .lista-dispositivo ul { + list-style: none; + margin: 0; + padding: 1em 0 0; + transition: all 2s linear; + clear: both; } + .result-busca-dispositivo ul li, .lista-dispositivo ul li { + display: table; + border-collapse: separate; + border-bottom: 1px solid white; + width: 100%; } + .result-busca-dispositivo ul li.ta_title, .lista-dispositivo ul li.ta_title { + background-color: rgba(0, 0, 0, 0.15); + border-radius: 4px 4px 0 0; + width: 100%; } + .result-busca-dispositivo ul li:last-child .itemlabel, .lista-dispositivo ul li:last-child .itemlabel { + border-radius: 0 0 4px 0px; + margin: 0px; } + .result-busca-dispositivo ul li:last-child .iteminput, .lista-dispositivo ul li:last-child .iteminput { + border-radius: 0 0 0px 4px; } + .result-busca-dispositivo ul li .iteminput, .lista-dispositivo ul li .iteminput { + background-color: rgba(0, 0, 0, 0.1); + border-right: 1px solid white; + display: table-cell; + padding: 0.5em; + vertical-align: middle; + text-align: center; } + .result-busca-dispositivo ul li .iteminput input, .lista-dispositivo ul li .iteminput input { + margin: 0; } + .result-busca-dispositivo ul li .itemlabel, .lista-dispositivo ul li .itemlabel { + background-color: rgba(0, 0, 0, 0.1); + display: table-cell; + padding: 0.5em; + vertical-align: middle; + width: 100%; } + .result-busca-dispositivo ul li .itemlabel .artigo, .lista-dispositivo ul li .itemlabel .artigo { + float: none; } + .result-busca-dispositivo .nomenclatura_heranca, .lista-dispositivo .nomenclatura_heranca { + font-size: 90%; + color: #057dba; + display: inline; } + +.lista-dispositivo.controls-radio-checkbox { + border: 0px; } + +.label_vigencia { + border-top: 1px solid white; + display: inline-block; + color: #555; } + .label_vigencia span { + color: gray; } + +.cp-nav-parents > .dropdown-menu { + left: 0; + right: auto; } + .cp-nav-parents > .dropdown-menu::before { + content: ''; + position: absolute; + top: -11px; + width: 100%; + height: 11px; } + +.cp-nav-parents:hover > .dropdown-menu { + display: block; } + +.table-notificacoes tbody tr td { + border-top: 1px solid white; + padding: 5px; + vertical-align: middle; } + .table-notificacoes tbody tr td ul { + margin: 0px; + /*padding: 0px; + list-style: none;*/ } + .table-notificacoes tbody tr td ul li:hover { + background-color: rgba(0, 0, 0, 0.1); } + +.btn-modal-open { + float: right; } + +.class_color_container { + background: #ddd !important; } + +.clear { + clear: both; } + +.mce-tinymce.mce-container { + border: 1px solid #ccc !important; + margin-right: 2px; } + +.mce-btn button:hover { + background-color: rgba(0, 0, 0, 0.1) !important; + text-shadow: 0 0 5px #fff; + box-shadow: 0 0 5px #777; } + +.mce-menu { + background: #eee !important; } + +.displaynone { + display: none !important; } + +@media only screen and (max-width: 800px) { + .cp .fixed { + z-index: 98; + position: relative; } + .cp.cpe1 .dpt-selected { + margin: 1em 0; } + .cp.cpe1 .dpt-selected .csform .actions_parents, .cp.cpe1 .dpt-selected .csform .label_status { + font-size: 80%; + position: static !important; + display: block !important; + padding: 0em; + height: auto !important; + left: 0; + right: auto; + text-align: left; } + .cp.cpe1 .dpt-selected .csform .actions_parents div, .cp.cpe1 .dpt-selected .csform .actions_parents li, .cp.cpe1 .dpt-selected .csform .label_status div, .cp.cpe1 .dpt-selected .csform .label_status li { + display: inline-block !important; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li > ul { + transform: translateY(30px); + transition: transform 0.1s linear, opacity 0.1s linear, clip 0s 0.3s; + clip: rect(0, 0, 0, 0); + opacity: 0; + position: absolute; + margin-left: 0.5em; + box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.19), 0px 2px 6px rgba(0, 0, 0, 0.23); + -webkit-transition-delay: 0.4s; + /* Safari */ + transition-delay: 0.4s; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li > ul li a { + border-right: 0px !important; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li > ul li:first-child::before { + border-width: 0.375rem; + border-style: inset inset solid; + content: ""; + display: block; + height: 0px; + width: 0px; + border-color: transparent transparent #3385CA; + position: absolute; + top: -0.71rem; + left: 0.9375rem; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li > ul li:first-child:hover::before { + border-color: transparent transparent #0A5EA4; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li > ul::after { + content: ""; + position: absolute; + z-index: -1; + left: 0; + top: rem-calc(-25px); + height: rem-calc(25px); + width: 100%; + transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1); } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li:hover > ul { + transform: translateY(7px); + transition: transform 0.4s linear, opacity 0.4s linear, clip 0s 0.2s; + opacity: 1; + clip: rect(-100px, 2000px, 2000px, -100px); } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li > a span { + display: none; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li > a.btn-excluir, .cp.cpe1 .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a.btn-salvar, .cp.cpe1_old_apagar .cp.cpe1 .dpt-selected .csform .actions_inserts > li > a.btn-salvar, .cp.cpe1 .dpt-selected .csform .actions_inserts > li > a.btn-salvar { + padding-left: 0; + min-width: 1em; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li > a.btn-excluir::before, .cp.cpe1 .cp.cpe1_old_apagar .dpt-selected .csform .actions_inserts > li > a.btn-salvar::before, .cp.cpe1_old_apagar .cp.cpe1 .dpt-selected .csform .actions_inserts > li > a.btn-salvar::before, .cp.cpe1 .dpt-selected .csform .actions_inserts > li > a.btn-salvar::before { + width: 100%; + margin: 0; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li.add_in, .cp.cpe1 .dpt-selected .csform .actions_inserts > li.add_next, .cp.cpe1 .dpt-selected .csform .actions_inserts > li.add_prior { + position: static; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li.add_in > ul { + left: 1em !important; + right: 1em !important; + margin-left: 0; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li.add_in > ul li:first-child::before { + left: 37%; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li.add_next > ul { + left: 0 !important; + right: 1em !important; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li.add_prior > ul { + left: 1em !important; + right: 0 !important; + margin-left: 0; + margin-right: 0.5em; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li.add_prior > ul li:first-child::before { + right: 42%; + left: auto; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li.menu_excluir > ul { + left: 10% !important; + right: 0 !important; + margin-left: 0; + margin-right: 0.5em; } + .cp.cpe1 .dpt-selected .csform .actions_inserts > li.menu_excluir > ul li:first-child::before { + right: 0; + left: auto; } } + +@media print { + .cp .vigencias, .toggle-topbar, .menu-icon, .button, .tipo-vigencias, .dne { + display: none; } + #btn_font_menos, #btn_font_mais { + display: none; } + .container { + width: 100%; } } From bf3d2f86f2b4303fba3e49be1d43ec317796d521 Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Mon, 15 Oct 2018 14:56:10 -0300 Subject: [PATCH 12/20] adicionado logging no app painel --- sapl/painel/views.py | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/sapl/painel/views.py b/sapl/painel/views.py index 88d0aa785..795121035 100755 --- a/sapl/painel/views.py +++ b/sapl/painel/views.py @@ -1,5 +1,6 @@ import html import json +import logging from django.contrib import messages from django.contrib.auth.decorators import user_passes_test @@ -83,7 +84,7 @@ def votacao_aberta(request): def votacao(context,context_vars): - + logger = logging.getLogger(__name__) parlamentar = context_vars['votante'].parlamentar parlamentar_presente = False if parlamentar.id in context_vars['presentes']: @@ -105,13 +106,17 @@ def votacao(context,context_vars): if voto: try: + logger.info("- Tentando obter objeto VotoParlamentar.") voto = voto.get(parlamentar=context_vars['parlamentar']) context.update({'voto_parlamentar': voto.voto}) except ObjectDoesNotExist: + logger.error("- Voto não computado.") context.update( {'voto_parlamentar': 'Voto não ' 'computado.'}) else: + logger.error("Você não está presente na " + "Ordem do Dia/Expediente em votação.") context.update({'error_message': 'Você não está presente na ' 'Ordem do Dia/Expediente em votação.'}) @@ -185,14 +190,18 @@ def can_vote(context, context_vars, request): def votante_view(request): + logger = logging.getLogger(__name__) # Pega o votante relacionado ao usuário template_name = 'painel/voto_nominal.html' context = {} context_vars = {} try: + logger.info("- Tentando obter objeto Votante.") votante = Votante.objects.get(user=request.user) except ObjectDoesNotExist: + logger.error("- Usuário não cadastrado como votante na tela de parlamentares. " + "Contate a administração de sua Casa Legislativa!") msg = _("Usuário não cadastrado como votante na tela de parlamentares. Contate a administração de sua Casa Legislativa!") context.update({ 'error_message':msg @@ -205,8 +214,9 @@ def votante_view(request): # Verifica se usuário possui permissão para votar if 'parlamentares.can_vote' in request.user.get_all_permissions(): context, context_vars = can_vote(context, context_vars, request) - + logger.info("- Verificando se usuário possui permissão para votar.") else: + logger.error("- Usuário sem permissão para votar.") context.update({'permissao': False, 'error_message': 'Usuário sem permissão para votar.'}) @@ -214,10 +224,12 @@ def votante_view(request): if request.method == 'POST': if context_vars['ordem_dia']: try: + logger.info("- Tentando obter objeto VotoParlamentar.") voto = VotoParlamentar.objects.get( parlamentar=context_vars['parlamentar'], ordem=context_vars['ordem_dia']) except ObjectDoesNotExist: + logger.error("- Erro ao obter VotoParlamentar. Criando objeto.") voto = VotoParlamentar.objects.create( parlamentar=context_vars['parlamentar'], voto=request.POST['voto'], @@ -225,6 +237,7 @@ def votante_view(request): ip=get_client_ip(request), ordem=context_vars['ordem_dia']) else: + logger.info("- VotoParlamentar obtido com sucesso.") voto.voto = request.POST['voto'] voto.ip = get_client_ip(request) voto.user = request.user @@ -232,10 +245,12 @@ def votante_view(request): elif context_vars['expediente']: try: + logger.info("- Tentando obter objeto VotoParlamentar.") voto = VotoParlamentar.objects.get( parlamentar=context_vars['parlamentar'], expediente=context_vars['expediente']) except ObjectDoesNotExist: + logger.error("- Erro ao obter VotoParlamentar. Criando objeto.") voto = VotoParlamentar.objects.create( parlamentar=context_vars['parlamentar'], voto=request.POST['voto'], @@ -243,6 +258,7 @@ def votante_view(request): ip=get_client_ip(request), expediente=context_vars['expediente']) else: + logger.info("- VotoParlamentar obtido com sucesso.") voto.voto = request.POST['voto'] voto.ip = get_client_ip(request) voto.user = request.user @@ -304,9 +320,12 @@ def cronometro_painel(request): def get_cronometro_status(request, name): + logger = logging.getLogger(__name__) try: + logger.info("- Tentando obter cronometro.") cronometro = request.session[name] except KeyError: + logger.error("- Erro ao obter cronometro. Retornado como vazio.") cronometro = '' return cronometro @@ -402,6 +421,7 @@ def response_nenhuma_materia(response): def get_votos(response, materia): + logger = logging.getLogger(__name__) if type(materia) == OrdemDia: registro = RegistroVotacao.objects.filter( ordem=materia, materia=materia.materia).last() @@ -433,9 +453,11 @@ def get_votos(response, materia): for i, p in enumerate(response['presentes']): try: + logger.info("- Tentando obter votos do parlamentar.") if votos_parlamentares.get(parlamentar_id=p['parlamentar_id']).voto: response['presentes'][i]['voto'] = 'Voto Informado' except ObjectDoesNotExist: + logger.error("- Votos não encontrados. Retornado vazio.") response['presentes'][i]['voto'] = '' else: @@ -450,9 +472,11 @@ def get_votos(response, materia): for i, p in enumerate(response['presentes']): try: + logger.info("- Tentando obter votos do parlamentar.") response['presentes'][i]['voto'] = votos_parlamentares.get( parlamentar_id=p['parlamentar_id']).voto except ObjectDoesNotExist: + logger.error("- Votos não encontrados. Retornado None.") response['presentes'][i]['voto'] = None response.update({ From 29d40138681305b8cff960fefb436d994a9f398a Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Mon, 15 Oct 2018 15:36:18 -0300 Subject: [PATCH 13/20] adicionados loggins no app parlamentares --- sapl/parlamentares/views.py | 52 ++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/sapl/parlamentares/views.py b/sapl/parlamentares/views.py index ad4a8f5e5..514023c2a 100755 --- a/sapl/parlamentares/views.py +++ b/sapl/parlamentares/views.py @@ -1,4 +1,5 @@ import json +import logging from datetime import datetime from django.contrib import messages @@ -267,11 +268,15 @@ def parlamentares_frente_selected(request): """ :return: Lista com o id dos parlamentares em uma frente """ + logger = logging.getLogger(__name__) try: + logger.info("- Tentando objet objeto Frente.") frente = Frente.objects.get(id=int(request.GET['frente_id'])) except ObjectDoesNotExist: + logger.error("- Frente buscada não existe. Retornada lista vazia.") lista_parlamentar_id = [] else: + logger.info("- Frente encontrada com sucesso.") lista_parlamentar_id = frente.parlamentares.all().values_list( 'id', flat=True) return JsonResponse({'id_list': list(lista_parlamentar_id)}) @@ -356,10 +361,13 @@ class LegislaturaCrud(CrudAux): form_class = LegislaturaForm def get_initial(self): + logger = logging.getLogger(__name__) try: + logger.error("- Tentando obter última legislatura.") ultima_legislatura = Legislatura.objects.latest('numero') numero = ultima_legislatura.numero + 1 except Legislatura.DoesNotExist: + logger.error("- Legislatura não encontrada. Número definido como 1.") numero = 1 return {'numero': numero} @@ -457,9 +465,12 @@ class ParlamentarCrud(Crud): return super().get(request, *args, **kwargs) def take_legislatura_id(self): + logger = logging.getLogger(__name__) try: + logger.info("- Tentando obter id da legislatura.") return int(self.request.GET['pk']) except: + logger.error("- Legislatura não possui ID. Buscando em todas as entradas.") legislaturas = Legislatura.objects.all() for l in legislaturas: if l.atual(): @@ -469,6 +480,7 @@ class ParlamentarCrud(Crud): return -1 def get_queryset(self): + logger = logging.getLogger(__name__) queryset = super().get_queryset() legislatura_id = self.take_legislatura_id() # Pelo menos uma casa legislativa criou uma @@ -479,11 +491,14 @@ class ParlamentarCrud(Crud): mandato_titular=F('mandato__titular')) else: try: + logger.info("- Tentando obter o mais recente registro do objeto Legislatura.") l = Legislatura.objects.all().order_by( '-data_inicio').first() except ObjectDoesNotExist: + logger.error("- Objeto não encontrado. Retornando todos os registros.") return Legislatura.objects.all() else: + logger.info("- Objeto encontrado com sucesso.") if l is None: return Legislatura.objects.all() return queryset.filter(mandato__legislatura_id=l).annotate( @@ -495,6 +510,7 @@ class ParlamentarCrud(Crud): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) + logger = logging.getLogger(__name__) # Adiciona legislatura para filtrar parlamentares legislaturas = Legislatura.objects.all().order_by('-numero') @@ -520,6 +536,7 @@ class ParlamentarCrud(Crud): # da legislatura e data de desfiliação deve nula, ou maior, # ou igual a data de fim da legislatura try: + logger.info("- Tentando obter filiação do parlamentar.") filiacao = parlamentar.filiacao_set.get(Q( data__lte=legislatura.data_fim, data_desfiliacao__gte=legislatura.data_fim) | Q( @@ -528,17 +545,20 @@ class ParlamentarCrud(Crud): # Caso não exista filiação com essas condições except ObjectDoesNotExist: + logger.error("- Parlamentar não possui filiação.") row[1] = ('Não possui filiação', None, None) # Caso exista mais de uma filiação nesse intervalo # Entretanto, NÃO DEVE OCORRER except MultipleObjectsReturned: + logger.error("- O Parlamentar possui duas filiações conflitantes") row[1] = ( 'O Parlamentar possui duas filiações conflitantes', None) # Caso encontre UMA filiação nessas condições else: + logger.info("- Filiação encontrada com sucesso.") row[1] = (filiacao.partido.sigla, None, None) return context @@ -566,13 +586,16 @@ class ParlamentarMateriasView(FormView): @xframe_options_exempt def get(self, request, *args, **kwargs): + logger = logging.getLogger(__name__) parlamentar_pk = kwargs['pk'] try: + logger.info("- Tentando obter autor da matéria.") autor = Autor.objects.get( content_type=ContentType.objects.get_for_model(Parlamentar), object_id=parlamentar_pk) except ObjectDoesNotExist: + logger.error("- Este Parlamentar não é autor de matéria.") mensagem = _('Este Parlamentar não é autor de matéria.') messages.add_message(request, messages.ERROR, mensagem) return HttpResponseRedirect( @@ -693,6 +716,7 @@ def altera_field_mesa(request): operação (Legislatura/Sessão/Inclusão/Remoção), atualizando os campos após cada alteração """ + logger = logging.getLogger(__name__) legislatura = request.GET['legislatura'] sessoes = SessaoLegislativa.objects.filter( legislatura=legislatura).order_by('-data_inicio') @@ -710,8 +734,10 @@ def altera_field_mesa(request): else: year = timezone.now().year try: + logger.info("- Tentando obter id da sessão.") sessao_selecionada = sessoes.get(data_inicio__year=year).id except ObjectDoesNotExist: + logger.error("- Id não encontrado. Selecionado o ID da primeira sessão.") sessao_selecionada = sessoes.first().id # Atualiza os componentes da view após a mudança @@ -751,7 +777,7 @@ def insere_parlamentar_composicao(request): Essa função lida com qualquer operação de inserção na composição da Mesa Diretora """ - + logger = logging.getLogger(__name__) if request.user.has_perm( '%s.add_%s' % ( AppConfig.label, ComposicaoMesa._meta.model_name)): @@ -759,19 +785,24 @@ def insere_parlamentar_composicao(request): composicao = ComposicaoMesa() try: + logger.info("- Tentando obter SessaoLegislativa correspondente.") composicao.sessao_legislativa = SessaoLegislativa.objects.get( id=int(request.POST['sessao'])) except MultiValueDictKeyError: + logger.error(" 'MultiValueDictKeyError', nenhuma sessão foi inserida!") return JsonResponse({'msg': ('Nenhuma sessão foi inserida!', 0)}) try: + logger.info("- Tentando obter Parlamentar correspondente.") composicao.parlamentar = Parlamentar.objects.get( id=int(request.POST['parlamentar'])) except MultiValueDictKeyError: + logger.error(" 'MultiValueDictKeyError', nenhum parlamentar foi inserido!") return JsonResponse({ 'msg': ('Nenhum parlamentar foi inserido!', 0)}) try: + logger.info("- Tentando obter CargoMesa correspondente.") composicao.cargo = CargoMesa.objects.get( id=int(request.POST['cargo'])) parlamentar_ja_inserido = ComposicaoMesa.objects.filter( @@ -784,11 +815,14 @@ def insere_parlamentar_composicao(request): composicao.save() except MultiValueDictKeyError: + logger.error("- 'MultiValueDictKeyError', nenhum cargo foi inserido!") return JsonResponse({'msg': ('Nenhum cargo foi inserido!', 0)}) + logger.info("- Parlamentar inserido com sucesso!") return JsonResponse({'msg': ('Parlamentar inserido com sucesso!', 1)}) else: + logger.error("- Você não tem permissão para esta operação!") return JsonResponse( {'msg': ('Você não tem permissão para esta operação!', 0)}) @@ -798,26 +832,30 @@ def remove_parlamentar_composicao(request): Essa função lida com qualquer operação de remoção na composição da Mesa Diretora """ - + logger = logging.getLogger(__name__) if request.POST and request.user.has_perm( '%s.delete_%s' % ( AppConfig.label, ComposicaoMesa._meta.model_name)): if 'composicao_mesa' in request.POST: try: + logger.info("- Tentando obter ComposicaoMesa correspondente.") composicao = ComposicaoMesa.objects.get( id=request.POST['composicao_mesa']) except ObjectDoesNotExist: + logger.error("- ComposicaoMesa não encontrada, portanto não pode ser removida.") return JsonResponse( {'msg': ( 'Composição da Mesa não pôde ser removida!', 0)}) composicao.delete() + logger.info("- Parlamentar excluido com sucesso!") return JsonResponse( {'msg': ( 'Parlamentar excluido com sucesso!', 1)}) else: + logger.info("- Nenhum parlamentar escolhido para ser excluído.") return JsonResponse( {'msg': ( 'Selecione algum parlamentar para ser excluido!', 0)}) @@ -833,7 +871,9 @@ def partido_parlamentar_sessao_legislativa(sessao, parlamentar): # A data de filiacao deve ser menor que a data de fim # da sessao legislativa e data de desfiliação deve nula, ou maior, # ou igual a data de fim da sessao + logger = logging.getLogger(__name__) try: + logger.info("- Tentando obter filiação correspondente.") filiacao = parlamentar.filiacao_set.get(Q( data__lte=sessao.data_fim, data_desfiliacao__gte=sessao.data_fim) | Q( @@ -842,15 +882,18 @@ def partido_parlamentar_sessao_legislativa(sessao, parlamentar): # Caso não exista filiação com essas condições except ObjectDoesNotExist: + logger.error("- Filiação não encontrada.") return '' # Caso exista mais de uma filiação nesse intervalo # Entretanto, NÃO DEVE OCORRER except MultipleObjectsReturned: + logger.error("- O Parlamentar possui duas filiações conflitantes.") return 'O Parlamentar possui duas filiações conflitantes' # Caso encontre UMA filiação nessas condições else: + logger.info("- Filiação encontrada com sucesso.") return filiacao.partido.sigla @@ -860,7 +903,7 @@ def altera_field_mesa_public_view(request): da Mesa Diretora para usuários anônimos, atualizando os campos após cada alteração """ - + logger = logging.getLogger(__name__) legislatura = request.GET['legislatura'] sessoes = SessaoLegislativa.objects.filter( legislatura=legislatura).order_by('-data_inicio') @@ -877,8 +920,11 @@ def altera_field_mesa_public_view(request): else: try: year = timezone.now().year + logger.info("- Tentando obter sessões correspondentes.") sessao_selecionada = sessoes.get(data_inicio__year=year).id except ObjectDoesNotExist as e: + logger.error("- Sessões não encontradas com aquelas correspondencias. " + "Selecionado o id da primeira sessão.") sessao_selecionada = sessoes.first().id # Atualiza os componentes da view após a mudança From 575447563d0dfaadf61b21098eac6b22e927b8ed Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Mon, 15 Oct 2018 16:15:54 -0300 Subject: [PATCH 14/20] adicionados loggins no app protocoloadm --- sapl/protocoloadm/forms.py | 36 ++++++++++++++++++++++++++++++++++++ sapl/protocoloadm/views.py | 17 +++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/sapl/protocoloadm/forms.py b/sapl/protocoloadm/forms.py index 8f80a5632..1fc917929 100755 --- a/sapl/protocoloadm/forms.py +++ b/sapl/protocoloadm/forms.py @@ -1,5 +1,6 @@ import django_filters +import logging from crispy_forms.bootstrap import InlineRadios from crispy_forms.helper import FormHelper from crispy_forms.layout import HTML, Button, Fieldset, Layout @@ -220,6 +221,8 @@ class AnularProcoloAdmForm(ModelForm): def clean(self): super(AnularProcoloAdmForm, self).clean() + logger = logging.getLogger(__name__) + cleaned_data = self.cleaned_data if not self.is_valid(): @@ -229,12 +232,15 @@ class AnularProcoloAdmForm(ModelForm): ano = cleaned_data['ano'] try: + logger.info("- Tentando obter Protocolo correspondente.") protocolo = Protocolo.objects.get(numero=numero, ano=ano) if protocolo.anulado: + logger.error("- Protocolo %s/%s já encontra-se anulado" % (numero, ano)) raise forms.ValidationError( _("Protocolo %s/%s já encontra-se anulado") % (numero, ano)) except ObjectDoesNotExist: + logger.error("- Protocolo %s/%s não existe" % (numero, ano)) raise forms.ValidationError( _("Protocolo %s/%s não existe" % (numero, ano))) @@ -247,6 +253,8 @@ class AnularProcoloAdmForm(ModelForm): ).order_by('-ano', '-numero').exists() if exists: + logger.error("- Protocolo %s/%s não pode ser removido pois existem " + "documentos vinculados a ele." % (numero, ano)) raise forms.ValidationError( _("Protocolo %s/%s não pode ser removido pois existem " "documentos vinculados a ele." % (numero, ano))) @@ -416,18 +424,24 @@ class ProtocoloMateriaForm(ModelForm): ] def clean_autor(self): + logger = logging.getLogger(__name__) autor_field = self.cleaned_data['autor'] try: + logger.info("- Tentando obter Autor correspondente.") autor = Autor.objects.get(id=autor_field.id) except ObjectDoesNotExist: + logger.error("- Autor não encontrado. Definido como None.") autor_field = None else: + logger.info("- Autor encontrado com sucesso.") autor_field = autor return autor_field def clean(self): super(ProtocoloMateriaForm, self).clean() + logger = logging.getLogger(__name__) + if not self.is_valid(): return self.cleaned_data @@ -435,16 +449,21 @@ class ProtocoloMateriaForm(ModelForm): if self.is_valid(): if data['vincular_materia'] == 'True': try: + logger.info("- Tentando obter MateriaLegislativa correspondente.") if not data['ano_materia'] or not data['numero_materia']: + logger.error("- Favor informar o número e ano da matéria a ser vinculada") raise ValidationError( 'Favor informar o número e ano da matéria a ser vinculada') self.materia = MateriaLegislativa.objects.get(ano=data['ano_materia'], numero=data['numero_materia'], tipo=data['tipo_materia']) if self.materia.numero_protocolo: + logger.error("- Matéria Legislativa informada já possui o protocolo {}/{} vinculado." + .format(self.materia.numero_protocolo, self.materia.ano)) raise ValidationError(_('Matéria Legislativa informada já possui o protocolo {}/{} vinculado.' .format(self.materia.numero_protocolo, self.materia.ano))) except ObjectDoesNotExist: + logger.error("- Matéria Legislativa informada não existente.") raise ValidationError(_('Matéria Legislativa informada não existente.')) return data @@ -666,6 +685,8 @@ class DocumentoAdministrativoForm(ModelForm): def clean(self): super(DocumentoAdministrativoForm, self).clean() + logger = logging.getLogger(__name__) + cleaned_data = self.cleaned_data if not self.is_valid(): @@ -693,14 +714,19 @@ class DocumentoAdministrativoForm(ModelForm): # campos opcionais, mas que se informados devem ser válidos if numero_protocolo and ano_protocolo: try: + logger.info("- Tentando obter Protoclo correspondente.") self.fields['protocolo'].initial = Protocolo.objects.get( numero=numero_protocolo, ano=ano_protocolo).pk except ObjectDoesNotExist: + logger.error("- Protocolo %s/%s inexistente." % ( + numero_protocolo, ano_protocolo)) msg = _('Protocolo %s/%s inexistente.' % ( numero_protocolo, ano_protocolo)) raise ValidationError(msg) except MultipleObjectsReturned: + logger.error("- Existe mais de um Protocolo com este ano e número." % ( + numero_protocolo, ano_protocolo)) msg = _( 'Existe mais de um Protocolo com este ano e número.' % ( numero_protocolo, ano_protocolo)) @@ -782,6 +808,8 @@ class DesvincularDocumentoForm(ModelForm): def clean(self): super(DesvincularDocumentoForm, self).clean() + logger = logging.getLogger(__name__) + cleaned_data = self.cleaned_data if not self.is_valid(): @@ -792,11 +820,14 @@ class DesvincularDocumentoForm(ModelForm): tipo = cleaned_data['tipo'] try: + logger.info("- Tentando obter DocumentoAdministrativo correspondente.") documento = DocumentoAdministrativo.objects.get(numero=numero, ano=ano, tipo=tipo) if not documento.protocolo: + logger.error("- %s %s/%s não se encontra vinculado a nenhum protocolo" % (tipo, numero, ano)) raise forms.ValidationError( _("%s %s/%s não se encontra vinculado a nenhum protocolo" % (tipo, numero, ano))) except ObjectDoesNotExist: + logger.error("- %s %s/%s não existe" % (tipo, numero, ano)) raise forms.ValidationError( _("%s %s/%s não existe" % (tipo, numero, ano))) @@ -844,6 +875,8 @@ class DesvincularMateriaForm(forms.Form): def clean(self): super(DesvincularMateriaForm, self).clean() + logger = logging.getLogger(__name__) + cleaned_data = self.cleaned_data if not self.is_valid(): @@ -854,11 +887,14 @@ class DesvincularMateriaForm(forms.Form): tipo = cleaned_data['tipo'] try: + logger.info("- Tentando obter MateriaLegislativa correspondente.") materia = MateriaLegislativa.objects.get(numero=numero, ano=ano, tipo=tipo) if not materia.numero_protocolo: + logger.error("- %s %s/%s não se encontra vinculada a nenhum protocolo" % (tipo, numero, ano)) raise forms.ValidationError( _("%s %s/%s não se encontra vinculada a nenhum protocolo" % (tipo, numero, ano))) except ObjectDoesNotExist: + logger.error("- %s %s/%s não existe" % (tipo, numero, ano)) raise forms.ValidationError( _("%s %s/%s não existe" % (tipo, numero, ano))) diff --git a/sapl/protocoloadm/views.py b/sapl/protocoloadm/views.py index a084f899c..d98b93b4d 100755 --- a/sapl/protocoloadm/views.py +++ b/sapl/protocoloadm/views.py @@ -18,6 +18,7 @@ from django.views.generic.edit import FormView from django_filters.views import FilterView import sapl +import logging from sapl.base.models import Autor from sapl.comissoes.models import Comissao from sapl.crud.base import Crud, CrudAux, MasterDetailCrud, make_pagination @@ -51,7 +52,9 @@ def recuperar_materia_protocolo(request): tipo = request.GET.get('tipo') ano = request.GET.get('ano') numero = request.GET.get('numero') + logger = logging.getLogger(__name__) try: + logger.info("- Tentando obter matéria correspondente.") materia = MateriaLegislativa.objects.get( tipo=tipo, ano=ano,numero=numero) autoria = materia.autoria_set.first() @@ -62,6 +65,7 @@ def recuperar_materia_protocolo(request): 'tipo_autor':autoria.autor.tipo.pk}) response = JsonResponse(content) except Exception as e: + logger.error(str(e)) response = JsonResponse({'error':e}) return response @@ -306,10 +310,14 @@ class ProtocoloDocumentoView(PermissionRequiredMixin, def form_valid(self, form): protocolo = form.save(commit=False) + logger = logging.getLogger(__name__) try: + logger.info("- Tentando obter sequência de numeração.") numeracao = sapl.base.models.AppConfig.objects.last( ).sequencia_numeracao except AttributeError: + logger.error("- É preciso definir a sequencia de " + "numeração na tabelas auxiliares!") msg = _('É preciso definir a sequencia de ' + 'numeração na tabelas auxiliares!') messages.add_message(self.request, messages.ERROR, msg) @@ -385,16 +393,21 @@ class ProtocoloMostrarView(PermissionRequiredMixin, TemplateView): permission_required = ('protocoloadm.detail_protocolo', ) def get_context_data(self, **kwargs): + logger = logging.getLogger(__name__) + context = super(ProtocoloMostrarView, self).get_context_data(**kwargs) protocolo = Protocolo.objects.get(pk=self.kwargs['pk']) if protocolo.tipo_materia: try: + logger.info("- Tentando obter objeto MateriaLegislativa correspondente.") materia = MateriaLegislativa.objects.get( numero_protocolo=protocolo.numero, ano=protocolo.ano) except ObjectDoesNotExist: + logger.error("- Objeto não encontrado. Definido como None.") context['materia'] = None else: + logger.info("- Objeto encontrado.") context['materia'] = materia if protocolo.tipo_documento: @@ -450,10 +463,14 @@ class ProtocoloMateriaView(PermissionRequiredMixin, CreateView): def form_valid(self, form): protocolo = form.save(commit=False) + logger = logging.getLogger(__name__) try: + logger.info("- Tentando obter sequência de numeração.") numeracao = sapl.base.models.AppConfig.objects.last( ).sequencia_numeracao except AttributeError: + logger.error("É preciso definir a sequencia de " + "numeração na tabelas auxiliares!") msg = _('É preciso definir a sequencia de ' + 'numeração na tabelas auxiliares!') messages.add_message(self.request, messages.ERROR, msg) From acd71d1e4c85d14e68c12813a92fe48ab404daa8 Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Mon, 15 Oct 2018 16:46:56 -0300 Subject: [PATCH 15/20] adicionados loggins no app redireciona_urls --- sapl/redireciona_urls/views.py | 112 ++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 22 deletions(-) diff --git a/sapl/redireciona_urls/views.py b/sapl/redireciona_urls/views.py index ade47c9de..77ab2c3e2 100755 --- a/sapl/redireciona_urls/views.py +++ b/sapl/redireciona_urls/views.py @@ -1,3 +1,5 @@ +import logging + from django.core.urlresolvers import NoReverseMatch, reverse from django.views.generic import RedirectView @@ -73,10 +75,13 @@ class RedirecionaSAPLIndex(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url_pattern = 'sapl_index' try: + logger.info("- Tentando obter url.") url = reverse(url_pattern) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(url_pattern) url = has_iframe(url, self.request) @@ -88,6 +93,7 @@ class RedirecionaParlamentar(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING pk_parlamentar = self.request.GET.get( 'cod_parlamentar', @@ -96,13 +102,17 @@ class RedirecionaParlamentar(RedirectView): if pk_parlamentar: try: kwargs = {'pk': pk_parlamentar} + logger.info("- Tentando obter url correspondente.") url = reverse(parlamentar_detail, kwargs=kwargs) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(parlamentar_detail, kwargs=kwargs) else: try: + logger.info("- Tentando obter url.") url = reverse(parlamentar_list) except NoReverseMatch: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(parlamentar_list) numero_legislatura = self.request.GET.get( @@ -121,6 +131,7 @@ class RedirecionaComissao(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING pk_comissao = self.request.GET.get('cod_comissao', EMPTY_STRING) @@ -128,13 +139,17 @@ class RedirecionaComissao(RedirectView): kwargs = {'pk': pk_comissao} try: + logger.info("- Tentando obter url correspondente.") url = reverse(comissao_detail, kwargs=kwargs) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(comissao_detail) else: try: + logger.info("- Tentando obter url.") url = reverse(comissao_list) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(comissao_list) url = has_iframe(url, self.request) @@ -146,6 +161,7 @@ class RedirecionaComposicaoComissao(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING pk_composicao = self.request.GET.get( 'cod_periodo_comp_sel', EMPTY_STRING) @@ -155,13 +171,17 @@ class RedirecionaComposicaoComissao(RedirectView): kwargs = {'pk': pk_comissao} try: + logger.info("- Tentando obter url correspondente.") url = reverse(comissao_detail, kwargs=kwargs) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(comissao_detail) else: try: + logger.info("- Tentando obter url.") url = reverse(comissao_list) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(comissao_list) url = has_iframe(url, self.request) @@ -173,6 +193,7 @@ class RedirecionaPautaSessao(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) pk_sessao_plenaria = self.request.GET.get( 'cod_sessao_plen', EMPTY_STRING) @@ -180,13 +201,17 @@ class RedirecionaPautaSessao(RedirectView): if pk_sessao_plenaria: kwargs = {'pk': pk_sessao_plenaria} try: + logger.info("- Tentando obter url correspondente.") url = reverse(pauta_sessao_detail, kwargs=kwargs) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(pauta_sessao_detail) else: try: + logger.info("- Tentando obter url.") url = reverse(pauta_sessao_list) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(pauta_sessao_list) data_sessao_plenaria = self.request.GET.get( @@ -214,6 +239,7 @@ class RedirecionaSessaoPlenaria(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) pk_sessao_plenaria = self.request.GET.get( 'cod_sessao_plen', EMPTY_STRING) @@ -221,14 +247,18 @@ class RedirecionaSessaoPlenaria(RedirectView): if pk_sessao_plenaria: kwargs = {'pk': pk_sessao_plenaria} try: + logger.info("- Tentando obter url correspondente.") url = reverse(sessao_plenaria_detail, kwargs=kwargs) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(sessao_plenaria_detail) else: try: + logger.info("- Tentando obter url.") url = reverse(sessao_plenaria_list) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(sessao_plenaria_list) year = self.request.GET.get( @@ -263,10 +293,13 @@ class RedirecionaRelatoriosList(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING try: + logger.info("- Tentando obter url.") url = reverse(relatorios_list) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(relatorios_list) url = has_iframe(url, self.request) @@ -278,10 +311,13 @@ class RedirecionaRelatoriosMateriasEmTramitacaoList(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING try: + logger.info("- Tentando obter url.") url = reverse(relatorio_materia_por_tramitacao) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(relatorio_materia_por_tramitacao) year = self.request.GET.get( @@ -341,11 +377,14 @@ class RedirecionaMateriaLegislativaList(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING args = EMPTY_STRING try: + logger.info("- Tentando obter url.") url = reverse(materialegislativa_list) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(materialegislativa_list) tipo_materia = self.request.GET.get( @@ -416,10 +455,13 @@ class RedirecionaMesaDiretoraView(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING try: + logger.info("- Tentando obter url.") url = reverse(parlamentar_mesa_diretora) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(parlamentar_mesa_diretora) url = has_iframe(url, self.request) @@ -449,12 +491,15 @@ class RedirecionaNormasJuridicasTextoIntegral(RedirectView): permanent = False def get_redirect_url(self, **kwargs): + logger = logging.getLogger(__name__) url = EMPTY_STRING try: + logger.info("- Tentando obter NormaJuridica correspondente.") norma = NormaJuridica.objects.get(pk=kwargs['norma_id']) if norma: url = norma.texto_integral.url except Exception as e: + logger.error("- Erro ao obter NormaJuridica. " + str(e)) raise e url = has_iframe(url, self.request) @@ -467,11 +512,14 @@ class RedirecionaNormasJuridicasList(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING args = EMPTY_STRING try: + logger.info("- Tentando obter url.") url = reverse(norma_juridica_pesquisa) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(norma_juridica_pesquisa) tipo_norma = self.request.GET.get( @@ -525,11 +573,14 @@ class RedirecionaHistoricoTramitacoesList(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING args = EMPTY_STRING try: + logger.info("- Tentando obter url.") url = reverse(historico_tramitacoes) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(historico_tramitacoes) inicio_intervalo_data_tramitacao = self.request.GET.get( @@ -582,11 +633,14 @@ class RedirecionaAtasList(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING args = EMPTY_STRING try: + logger.info("- Tentando obter url.") url = reverse(pesquisar_atas) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(pesquisar_atas) inicio_intervalo_data_ata = self.request.GET.get( @@ -616,11 +670,14 @@ class RedirecionaPresencaParlamentares(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING args = EMPTY_STRING try: + logger.info("- Tentando obter url.") url = reverse(presenca_sessao) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(presenca_sessao) inicio_intervalo_data_presenca_parlamentar = self.request.GET.get( @@ -650,10 +707,13 @@ class RedirecionaMateriasPorAutor(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING try: + logger.info("- Tentando obter url.") url = reverse(relatorio_materia_por_autor) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(relatorio_materia_por_autor) url = has_iframe(url, self.request) @@ -666,12 +726,15 @@ class RedirecionaMateriasPorAnoAutorTipo(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) url = EMPTY_STRING ano = self.request.GET.get('ano', '') try: + logger.info("- Tentando obter url.") url = reverse(relatorio_materia_por_ano_autor_tipo) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(relatorio_materia_por_ano_autor_tipo) if ano: @@ -688,6 +751,7 @@ class RedirecionaReuniao(RedirectView): permanent = True def get_redirect_url(self): + logger = logging.getLogger(__name__) pk_reuniao = self.request.GET.get( 'cod_comissao', EMPTY_STRING) @@ -695,14 +759,18 @@ class RedirecionaReuniao(RedirectView): if pk_reuniao: kwargs = {'pk': pk_reuniao} try: + logger.info("- Tentando obter url correspondente.") url = reverse(reuniao_detail, kwargs=kwargs) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(reuniao_detail) else: try: + logger.info("- Tentando obter url.") url = reverse(reuniao_list) - except NoReverseMatch: + except NoReverseMatch as e: + logger.error("- Erro ao obter url. " + str(e)) raise UnknownUrlNameError(reuniao_list) year = self.request.GET.get( From 4ac1a83d893408fb9cc18bbe4e489b6a8f1adc03 Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Mon, 15 Oct 2018 16:56:14 -0300 Subject: [PATCH 16/20] adicionados loggings no app relatorios --- sapl/relatorios/views.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sapl/relatorios/views.py b/sapl/relatorios/views.py index 676eb0961..98b290af5 100755 --- a/sapl/relatorios/views.py +++ b/sapl/relatorios/views.py @@ -1,5 +1,6 @@ import html import re +import logging from datetime import datetime as dt from django.core.exceptions import ObjectDoesNotExist @@ -791,7 +792,7 @@ def relatorio_sessao_plenaria(request, pk): ''' pdf_sessao_plenaria_gerar.py ''' - + logger = logging.getLogger(__name__) response = HttpResponse(content_type='application/pdf') response['Content-Disposition'] = ( 'inline; filename="relatorio_protocolo.pdf"') @@ -806,8 +807,10 @@ def relatorio_sessao_plenaria(request, pk): imagem = get_imagem(casa) try: + logger.info("- Tentando obter SessaoPlenaria correspondente.") sessao = SessaoPlenaria.objects.get(id=pk) - except ObjectDoesNotExist: + except ObjectDoesNotExist as e: + logger.error("- Essa página não existe. "+ str(e)) raise Http404('Essa página não existe') (inf_basicas_dic, @@ -1133,8 +1136,8 @@ def get_pauta_sessao(sessao, casa): numeracao = Numeracao.objects.filter( materia=votacao.materia).first() if numeracao is not None: - numeracao = numeracao.first() - dic_votacao["des_numeracao"] = str( + numeracao = numeracao.first() + dic_votacao["des_numeracao"] = str( numeracao.numero_materia) + '/' + str(numeracao.ano_materia) turno, tramitacao = get_turno(dic_votacao, materia, sessao.data_inicio) From c22ffdca0bd9edeec941026c4d2c72cdd1b520cd Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Mon, 15 Oct 2018 17:06:40 -0300 Subject: [PATCH 17/20] adicionados loggings no app rules --- sapl/rules/apps.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/sapl/rules/apps.py b/sapl/rules/apps.py index dbdfce8ce..0c97787a1 100755 --- a/sapl/rules/apps.py +++ b/sapl/rules/apps.py @@ -1,6 +1,8 @@ from builtins import LookupError import django +import logging + from django.apps import apps from django.contrib.auth import get_user_model from django.contrib.auth.management import _get_all_permissions @@ -28,12 +30,14 @@ def create_proxy_permissions( using=DEFAULT_DB_ALIAS, **kwargs): if not app_config.models_module: return - + logger = logging.getLogger(__name__) # print(app_config) try: + logging.info("- Tentando obter modelo de permissão do app.") Permission = apps.get_model('auth', 'Permission') - except LookupError: + except LookupError as e: + logging.error("- " + str(e)) return if not router.allow_migrate_model(using, Permission): @@ -69,9 +73,11 @@ def create_proxy_permissions( app_label, model = opts.app_label, opts.model_name try: + logging.info("- Tentando obter db_manager.") ctype = ContentType.objects.db_manager( using).get_by_natural_key(app_label, model) - except: + except Exception as e: + logging.error("- " + str(e)) ctype = ContentType.objects.db_manager( using).create(app_label=app_label, model=model) else: @@ -81,12 +87,14 @@ def create_proxy_permissions( # FIXME: Retirar try except quando sapl passar a usar django 1.11 try: + logger.info("- _get_all_permissions") # Função não existe mais em Django 1.11 # como sapl ainda não foi para Django 1.11 # esta excessão foi adicionada para caso o # Sapl esteja rodando em um projeto 1.11 não ocorra erros _all_perms_of_klass = _get_all_permissions(klass._meta, ctype) - except: + except Exception as e: + logger.error("- " + str(e)) # Nova função usada em projetos com Django 1.11 e o sapl é uma app _all_perms_of_klass = _get_all_permissions(klass._meta) @@ -111,6 +119,13 @@ def create_proxy_permissions( # error when the name is longer than 255 characters for perm in perms: if len(perm.name) > permission_name_max_length: + logger.error("- 'The permission name %s of %s.%s " + "is longer than %s characters" % ( + perm.name, + perm.content_type.app_label, + perm.content_type.model, + permission_name_max_length, + )) raise exceptions.ValidationError( 'The permission name %s of %s.%s ' 'is longer than %s characters' % ( @@ -155,15 +170,17 @@ def get_rules(): def _config_group(self, group_name, rules_list): if not group_name: return - + logger = logging.getLogger(__name__) group, created = Group.objects.get_or_create(name=group_name) group.permissions.clear() try: + logger.info("- Tentando associar grupos.") print(' ', group_name) for model, perms in rules_list: self.associar(group, model, perms) except Exception as e: + logger.error("- " + str(e)) print(group_name, e) def groups_add_user(self, user, groups_name): From ddaa4593e11d9c05a249db7ff5df9f4f5cc3ddb9 Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Tue, 16 Oct 2018 13:39:48 -0300 Subject: [PATCH 18/20] adicionados loggings no app api --- sapl/api/forms.py | 5 +++++ sapl/api/views.py | 9 +++++++-- sapl/comissoes/forms.py | 18 ++++++++++-------- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/sapl/api/forms.py b/sapl/api/forms.py index 94bc80de4..51044abc5 100755 --- a/sapl/api/forms.py +++ b/sapl/api/forms.py @@ -1,3 +1,5 @@ +import logging + from django.db.models import Q from django.forms.fields import CharField, MultiValueField from django.forms.widgets import MultiWidget, TextInput @@ -135,9 +137,12 @@ class AutoresPossiveisFilterSet(FilterSet): return queryset def filter_tipo(self, queryset, value): + logger = logging.getLogger(__name__) try: + logger.info("- Tentando obter Tipo de Autor correspondente.") tipo = TipoAutor.objects.get(pk=value) except: + logger.error("- Tipo de Autor inexistente.") raise serializers.ValidationError(_('Tipo de Autor inexistente.')) qs = queryset.filter(tipo=tipo) diff --git a/sapl/api/views.py b/sapl/api/views.py index 9853e6af0..3af0aae25 100755 --- a/sapl/api/views.py +++ b/sapl/api/views.py @@ -1,3 +1,4 @@ +import logging from django.contrib.contenttypes.models import ContentType from django.db.models import Q from django.http import Http404 @@ -137,6 +138,7 @@ class AutorListView(ListAPIView): @property def tr(self): + logger = logging.getLogger(__name__) try: tr = int(self.request.GET.get ('tr', AutorListView.TR_AUTOR_CHOICE_SERIALIZER)) @@ -145,7 +147,8 @@ class AutorListView(ListAPIView): AutorListView.TR_AUTOR_CHOICE_SERIALIZER, AutorListView.TR_AUTOR_SERIALIZER), sapl_logger.info( _("Tipo do Resultado a ser fornecido não existe!")) - except: + except Exception as e: + logger.error("- " + str(e)) return AutorListView.TR_AUTOR_CHOICE_SERIALIZER else: return tr @@ -173,6 +176,7 @@ class AutoresProvaveisListView(ListAPIView): serializer_class = ChoiceSerializer def get_queryset(self): + logger = logging.getLogger(__name__) params = {'content_type__isnull': False} tipo = '' @@ -180,7 +184,8 @@ class AutoresProvaveisListView(ListAPIView): tipo = int(self.request.GET.get('tipo', '')) if tipo: params['id'] = tipo - except: + except Exception as e: + logger.error("- " + str(e)) pass tipos = TipoAutor.objects.filter(**params) diff --git a/sapl/comissoes/forms.py b/sapl/comissoes/forms.py index ae938d61a..be73d4075 100755 --- a/sapl/comissoes/forms.py +++ b/sapl/comissoes/forms.py @@ -159,7 +159,7 @@ class ParticipacaoCreateForm(forms.ModelForm): if cleaned_data['cargo'].nome in cargos_unicos: msg = _('Este cargo é único para esta Comissão.') - logger.error('- ' + msg) + logger.error('- Este cargo é único para esta Comissão.') raise ValidationError(msg) return cleaned_data @@ -282,43 +282,43 @@ class ComissaoForm(forms.ModelForm): if len(self.cleaned_data['nome']) > 100: msg = _('Nome da Comissão deve ter no máximo 50 caracteres.') - logger.error('- ' + msg) + logger.error('- Nome da Comissão deve ter no máximo 50 caracteres.') raise ValidationError(msg) if (self.cleaned_data['data_extincao'] and self.cleaned_data['data_extincao'] < self.cleaned_data['data_criacao']): msg = _('Data de extinção não pode ser menor que a de criação') - logger.error('- ' + msg) + logger.error('- Data de extinção não pode ser menor que a de criação') raise ValidationError(msg) if (self.cleaned_data['data_final_prevista_temp'] and self.cleaned_data['data_final_prevista_temp'] < self.cleaned_data['data_criacao']): msg = _('Data Prevista para Término não pode ser menor que a de criação') - logger.error('- ' + msg) + logger.error('- Data Prevista para Término não pode ser menor que a de criação') raise ValidationError(msg) if (self.cleaned_data['data_prorrogada_temp'] and self.cleaned_data['data_prorrogada_temp'] < self.cleaned_data['data_criacao']): msg = _('Data Novo Prazo não pode ser menor que a de criação') - logger.error('- ' + msg) + logger.error('- Data Novo Prazo não pode ser menor que a de criação') raise ValidationError(msg) if (self.cleaned_data['data_instalacao_temp'] and self.cleaned_data['data_instalacao_temp'] < self.cleaned_data['data_criacao']): msg = _('Data de Instalação não pode ser menor que a de criação') - logger.error('- ' + msg) + logger.error('- Data de Instalação não pode ser menor que a de criação') raise ValidationError(msg) if (self.cleaned_data['data_final_prevista_temp'] and self.cleaned_data['data_instalacao_temp'] and self.cleaned_data['data_final_prevista_temp'] < self.cleaned_data['data_instalacao_temp']): msg = _('Data Prevista para Término não pode ser menor que a de Instalação') - logger.error('- ' + msg) + logger.error('- Data Prevista para Término não pode ser menor que a de Instalação.') raise ValidationError(msg) if (self.cleaned_data['data_prorrogada_temp'] and self.cleaned_data['data_instalacao_temp'] and self.cleaned_data['data_prorrogada_temp'] < self.cleaned_data['data_instalacao_temp']): msg = _('Data Novo Prazo não pode ser menor que a de Instalação') - logger.error('- ' + msg) + logger.error('- Data Novo Prazo não pode ser menor que a de Instalação.') raise ValidationError(msg) return self.cleaned_data @@ -354,6 +354,7 @@ class ReuniaoForm(ModelForm): def clean(self): super(ReuniaoForm, self).clean() + logger = logging.getLogger(__name__) if not self.is_valid(): return self.cleaned_data @@ -362,6 +363,7 @@ class ReuniaoForm(ModelForm): if (self.cleaned_data['hora_fim'] < self.cleaned_data['hora_inicio']): msg = _('A hora de término da reunião não pode ser menor que a de início') + logger.error("- A hora de término da reunião não pode ser menor que a de início") raise ValidationError(msg) return self.cleaned_data From a97dfd55e980b477eb732d60ff63bb6cc17018bc Mon Sep 17 00:00:00 2001 From: AndreSouto Date: Tue, 16 Oct 2018 13:43:04 -0300 Subject: [PATCH 19/20] =?UTF-8?q?Adicionando=20informa=C3=A7=C3=A3o=20de?= =?UTF-8?q?=20host=20no=20log=20(em=20progresso)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/middleware.py | 16 ++++++++++++++++ sapl/settings.py | 16 +++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 sapl/middleware.py diff --git a/sapl/middleware.py b/sapl/middleware.py new file mode 100644 index 000000000..fad4e152f --- /dev/null +++ b/sapl/middleware.py @@ -0,0 +1,16 @@ +from django.contrib.sites.models import Site + +from sapl import settings + + +class SiteMiddleware(object): + def process_request(self, request): + try: + current_site = Site.objects.get(domain=request.get_host()) + except Site.DoesNotExist: + current_site = Site.objects.get(id=1) + + request.current_site = current_site + settings.HOST = request.get_host() + + import pdb; pdb.set_trace() diff --git a/sapl/settings.py b/sapl/settings.py index 7a3aba0be..9447e84f7 100755 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -23,10 +23,11 @@ from unipath import Path from .temp_suppress_crispy_form_warnings import \ SUPRESS_CRISPY_FORM_WARNINGS_LOGGING +HOST = None + BASE_DIR = Path(__file__).ancestor(1) PROJECT_DIR = Path(__file__).ancestor(2) - # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = config('SECRET_KEY', default='') # SECURITY WARNING: don't run with debug turned on in production! @@ -74,6 +75,7 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'django.contrib.sites', # more 'django_extensions', @@ -132,8 +134,13 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', # 'speedinfo.middleware.ProfilerMiddleware', # Bug na versão 1.9 + + 'sapl.middleware.SiteMiddleware', ) +DEFAULT_SITE_ID = 1 +SITE_ID = 1 + CACHES = { 'default': { 'BACKEND': 'speedinfo.backends.proxy_cache', @@ -297,7 +304,7 @@ LOGGING = { 'disable_existing_loggers': False, 'formatters': { 'verbose': { - 'format': '%(levelname)s %(asctime)s %(filename)s %(funcName)s %(lineno)d %(name)s %(message)s' + 'format': '%(levelname)s %(asctime)s ' + str(HOST) + ' %(filename)s %(funcName)s %(lineno)d %(name)s %(message)s' }, 'simple': { 'format': '%(levelname)s %(asctime)s %(message)s' @@ -307,7 +314,10 @@ LOGGING = { # TODO Ver depois ! 'require_debug_false': { '()': 'django.utils.log.RequireDebugFalse' - } + }, + 'site_filter': { + '()': 'sapl.logging_filters.SiteFilter', + }, }, 'handlers': { 'console': { From e43acc8b2bd682c84b1c682003819fca5131c7ef Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Tue, 16 Oct 2018 14:04:42 -0300 Subject: [PATCH 20/20] adicionados loggings nos apps crud e compilacao --- sapl/audiencia/forms.py | 4 +++- sapl/compilacao/views.py | 44 ++++++++++++++++++++++++++++++++-------- sapl/crud/base.py | 43 ++++++++++++++++++++++++++++++--------- 3 files changed, 72 insertions(+), 19 deletions(-) diff --git a/sapl/audiencia/forms.py b/sapl/audiencia/forms.py index 88dd04e4c..3f317c870 100755 --- a/sapl/audiencia/forms.py +++ b/sapl/audiencia/forms.py @@ -72,17 +72,19 @@ class AudienciaForm(forms.ModelForm): if materia and ano_materia and tipo_materia: try: + logger.info("- Tentando obter matéria correspondente.") materia = MateriaLegislativa.objects.get( numero=materia, ano=ano_materia, tipo=tipo_materia) except ObjectDoesNotExist: - msg = _('A matéria %s nº %s/%s não existe no cadastro' + msg = _('- A matéria %s nº %s/%s não existe no cadastro' ' de matérias legislativas.' % (tipo_materia, materia, ano_materia)) logger.error('- A matéria %s nº %s/%s não existe no cadastro' ' de matérias legislativas.' % (tipo_materia, materia, ano_materia)) raise ValidationError(msg) else: + logger.info("- Matéria obtida com sucesso.") cleaned_data['materia'] = materia else: diff --git a/sapl/compilacao/views.py b/sapl/compilacao/views.py index a9ebf3fa4..b9943acca 100755 --- a/sapl/compilacao/views.py +++ b/sapl/compilacao/views.py @@ -666,6 +666,7 @@ class NotasCreateView(NotaMixin, CreateView): return super(NotasCreateView, self).get(request, *args, **kwargs) def post(self, request, *args, **kwargs): + logger = logging.getLogger(__name__) self.object = None try: ta_id = kwargs.pop('ta_id') @@ -683,7 +684,9 @@ class NotasCreateView(NotaMixin, CreateView): else: return self.form_invalid(form) except Exception as e: + logger.error("- " + str(e)) print(e) + logger.error("- Error post.") return HttpResponse("error post") @@ -760,7 +763,7 @@ class PublicacaoMixin(CompMixin): messages.error(request, _( 'A funcionalidade de %s está desativada para %s.') % ( TipoTextoArticulado._meta.get_field( - 'publicacao_func').verbose_name, + 'publicacao_func').verbose_name, ta.tipo_ta.descricao)) return redirect(reverse('sapl.compilacao:ta_text', kwargs={'ta_id': self.kwargs['ta_id']})) @@ -1518,6 +1521,7 @@ class ActionDeleteDispositivoMixin(ActionsCommonsMixin): return data def remover_dispositivo(self, base, bloco): + logger = logging.getLogger(__name__) base_ordem = base.ordem if base.dispositivo_subsequente or base.dispositivo_substituido: p = base.dispositivo_substituido @@ -1543,6 +1547,7 @@ class ActionDeleteDispositivoMixin(ActionsCommonsMixin): p.dispositivos_filhos_set.add(d) p.save() except Exception as e: + logger.error("- " + str(e)) print(e) base.delete() else: @@ -1577,6 +1582,8 @@ class ActionDeleteDispositivoMixin(ActionsCommonsMixin): dispositivo_pai=base).first() if not anterior: + logger.error("- Não é possível excluir este Dispositivo sem" + " excluir toda a sua estrutura!!!") raise Exception( _('Não é possível excluir este Dispositivo sem' ' excluir toda a sua estrutura!!!')) @@ -1596,6 +1603,9 @@ class ActionDeleteDispositivoMixin(ActionsCommonsMixin): for candidato in parents: if candidato == base: + logger.error("- Não é possível excluir este " + "Dispositivo sem " + "excluir toda a sua estrutura!!!") raise Exception( _('Não é possível excluir este ' 'Dispositivo sem ' @@ -1631,7 +1641,9 @@ class ActionDeleteDispositivoMixin(ActionsCommonsMixin): d.rotulo = d.rotulo_padrao() break else: - + logger.error("- Não é possível excluir este " + "Dispositivo sem " + "excluir toda a sua estrutura!!!") raise Exception( _('Não é possível excluir este ' 'Dispositivo sem ' @@ -1677,7 +1689,8 @@ class ActionDeleteDispositivoMixin(ActionsCommonsMixin): profundidade=profundidade_base) irmao.rotulo = irmao.rotulo_padrao() irmao.save() - except: + except Exception as e: + logger.error("- " + str(e)) break irmaos = pai_base.dispositivos_filhos_set.\ @@ -1794,7 +1807,8 @@ class ActionDeleteDispositivoMixin(ActionsCommonsMixin): dr.rotulo = dr.rotulo_padrao() try: dr.save(clean=base != dr) - except: + except Exception as e: + logger.error("- " + str(e)) break # Pode não ser religavável @@ -1839,6 +1853,7 @@ class ActionDeleteDispositivoMixin(ActionsCommonsMixin): class ActionDispositivoCreateMixin(ActionsCommonsMixin): def allowed_inserts(self, _base=None): + logger = logging.getLogger(__name__) request = self.request try: base = Dispositivo.objects.get( @@ -2092,14 +2107,15 @@ class ActionDispositivoCreateMixin(ActionsCommonsMixin): return result except Exception as e: + logger.error("- " + str(e)) print(e) return {} def json_set_dvt(self, context): + logger = logging.getLogger(__name__) # Dispositivo de Vigência do Texto Original e de Dpts Alterados dvt = Dispositivo.objects.get(pk=self.kwargs['dispositivo_id']) - if dvt.auto_inserido: dvt = dvt.dispositivo_pai @@ -2140,6 +2156,8 @@ class ActionDispositivoCreateMixin(ActionsCommonsMixin): return data except: data = {} + logger.error("- Ocorreu um erro na atualização do " + "Dispositivo de Vigência") self.set_message(data, 'success', _('Ocorreu um erro na atualização do ' @@ -2156,8 +2174,9 @@ class ActionDispositivoCreateMixin(ActionsCommonsMixin): def json_add_next( self, context, local_add='json_add_next', create_auto_inserts=True): + logger = logging.getLogger(__name__) try: - + dp_auto_insert = None base = Dispositivo.objects.get(pk=self.kwargs['dispositivo_id']) tipo = TipoDispositivo.objects.get(pk=context['tipo_pk']) @@ -2427,6 +2446,7 @@ class ActionDispositivoCreateMixin(ActionsCommonsMixin): return data except Exception as e: + logger.error("- " + str(e)) print(e) return {} @@ -2586,6 +2606,7 @@ class ActionsEditMixin(ActionDragAndMoveDispositivoAlteradoMixin, mudança, porém, após registro de alteração, a mudança de rótulo pode ser feita no editor avançado. """ + logger = logging.getLogger(__name__) data = {} data.update({'pk': bloco_alteracao.pk, @@ -2706,6 +2727,7 @@ class ActionsEditMixin(ActionDragAndMoveDispositivoAlteradoMixin, _('Dispositivo de Revogação adicionado com sucesso.')) except Exception as e: + logger.error("- " + str(e)) print(e) data.update({'pk': ndp.pk, @@ -3104,6 +3126,7 @@ class DispositivoEdicaoBasicaView(CompMixin, FormMessagesMixin, UpdateView): return 'sapl.compilacao:dispositivo_edit' def run_actions(self, request): + logger = logging.getLogger(__name__) if 'action' in request.GET and\ request.GET['action'] == 'atualiza_rotulo': try: @@ -3131,6 +3154,7 @@ class DispositivoEdicaoBasicaView(CompMixin, FormMessagesMixin, UpdateView): d.rotulo = d.rotulo_padrao() except: + logger.error("- Ocorreu erro na atualização do rótulo.") return True, JsonResponse({'message': str( _('Ocorreu erro na atualização do rótulo'))}, safe=False) return True, JsonResponse({ @@ -3220,6 +3244,7 @@ class DispositivoDefinidorVigenciaView(CompMixin, FormMessagesMixin, FormView): return context def post(self, request, *args, **kwargs): + logger = logging.getLogger(__name__) self.object = get_object_or_404(Dispositivo, pk=kwargs['pk']) form = self.get_form() @@ -3232,7 +3257,8 @@ class DispositivoDefinidorVigenciaView(CompMixin, FormMessagesMixin, FormView): d = Dispositivo.objects.get(pk=item) self.object.dispositivos_vigencias_set.add(d) return self.form_valid(form) - except: + except Exception as e: + logger.error("- " + str(e)) return self.form_invalid(form) else: return self.form_invalid(form) @@ -3263,6 +3289,7 @@ class DispositivoEdicaoAlteracaoView(CompMixin, FormMessagesMixin, UpdateView): kwargs={'ta_id': self.kwargs['ta_id'], 'pk': self.kwargs['pk']}) def post(self, request, *args, **kwargs): + logger = logging.getLogger(__name__) self.object = get_object_or_404(Dispositivo, pk=kwargs['pk']) form = self.get_form() @@ -3270,7 +3297,8 @@ class DispositivoEdicaoAlteracaoView(CompMixin, FormMessagesMixin, UpdateView): try: with transaction.atomic(): return self.form_valid(form) - except: + except Exception as e: + logger.error('- ' + str(e)) return self.form_invalid(form) else: return self.form_invalid(form) diff --git a/sapl/crud/base.py b/sapl/crud/base.py index 77462a5f8..53677e982 100755 --- a/sapl/crud/base.py +++ b/sapl/crud/base.py @@ -113,6 +113,8 @@ class SearchMixin(models.Model): def save(self, force_insert=False, force_update=False, using=None, update_fields=None, auto_update_search=True): + logger = logging.getLogger(__name__) + if auto_update_search and hasattr(self, 'fields_search'): search = '' for str_field in self.fields_search: @@ -120,7 +122,8 @@ class SearchMixin(models.Model): if len(fields) == 1: try: search += str(getattr(self, str_field)) + ' ' - except: + except Exception as e: + logger.error("- " + str(e)) pass else: _self = self @@ -512,6 +515,7 @@ class CrudListView(PermissionRequiredContainerCrudMixin, ListView): return context def get_queryset(self): + logger = logging.getLogger(__name__) queryset = super().get_queryset() # form_search_class @@ -556,7 +560,8 @@ class CrudListView(PermissionRequiredContainerCrudMixin, ListView): fm = None try: fm = model._meta.get_field(fo) - except: + except Exception as e: + logger.error("- " + str(e)) pass if fm and hasattr(fm, 'related_model')\ @@ -621,11 +626,13 @@ class CrudCreateView(PermissionRequiredContainerCrudMixin, return super(CrudCreateView, self).get_context_data(**kwargs) def form_valid(self, form): + logger = logging.getLogger(__name__) self.object = form.instance try: self.object.owner = self.request.user self.object.modifier = self.request.user - except: + except Exception as e: + logger.error("- " + str(e)) pass if self.container_field: @@ -681,6 +688,7 @@ class CrudDetailView(PermissionRequiredContainerCrudMixin, return [self._as_row(obj) for obj in object_list] def get_headers(self): + logger = logging.getLogger(__name__) if not self.object_list: return [] try: @@ -694,7 +702,8 @@ class CrudDetailView(PermissionRequiredContainerCrudMixin, self.object, obj.model_set).model._meta.get_field( fieldname).related_model._meta.verbose_name_plural) for fieldname in self.list_field_names_set] - except: + except Exception as e: + logger.error("- " + str(e)) obj = self.crud if hasattr(self, 'crud') else self return [getattr( self.object, @@ -715,13 +724,15 @@ class CrudDetailView(PermissionRequiredContainerCrudMixin, args=args) def _as_row(self, obj): + logger = logging.getLogger(__name__) try: return [( get_field_display(obj, name)[1], self.resolve_model_set_url(ACTION_DETAIL, args=(obj.id,)) if i == 0 else None) for i, name in enumerate(self.list_field_names_set)] - except: + except Exception as e: + logger.error("- " + str(e)) return [( getattr(obj, name), self.resolve_model_set_url(ACTION_DETAIL, args=(obj.id,)) @@ -734,9 +745,11 @@ class CrudDetailView(PermissionRequiredContainerCrudMixin, return DetailView.get_object(self, queryset=queryset) def get(self, request, *args, **kwargs): + logger = logging.getLogger(__name__) try: self.object = self.model.objects.get(pk=kwargs.get('pk')) - except: + except Exception as e: + logger.error("- " + str(e).) raise Http404 obj = self.crud if hasattr(self, 'crud') else self if hasattr(obj, 'model_set') and obj.model_set: @@ -811,10 +824,12 @@ class CrudUpdateView(PermissionRequiredContainerCrudMixin, permission_required = (RP_CHANGE, ) def form_valid(self, form): + logger = logging.getLogger(__name__) self.object = form.instance try: self.object.modifier = self.request.user - except: + except Exception as e: + logger.error("- " + str(e)) pass return super().form_valid(form) @@ -851,6 +866,7 @@ class CrudDeleteView(PermissionRequiredContainerCrudMixin, return self.list_url def delete(self, request, *args, **kwargs): + logger = logging.getLogger(__name__) try: return super(CrudDeleteView, self).delete(request, args, kwargs) except models.ProtectedError as err: @@ -862,7 +878,8 @@ class CrudDeleteView(PermissionRequiredContainerCrudMixin, i._meta.verbose_name, i ) error_msg += '' - + logger.error("Registro não pode ser removido, pois " + "é referenciado por outros registros") messages.add_message(request, messages.ERROR, error_msg) @@ -1072,6 +1089,8 @@ class MasterDetailCrud(Crud): return r'^(?P\d+)/%s$' % cls.model._meta.model_name def get_context_data(self, **kwargs): + logger = logging.getLogger(__name__) + obj = self.crud if hasattr(self, 'crud') else self context = CrudListView.get_context_data(self, **kwargs) @@ -1102,7 +1121,8 @@ class MasterDetailCrud(Crud): try: parent_object = parent_model.objects.get(**params) - except: + except Exception as e: + logger.error("- " + str(e)) raise Http404() context[ @@ -1148,6 +1168,8 @@ class MasterDetailCrud(Crud): return form def get_context_data(self, **kwargs): + logger = logging.getLogger(__name__) + obj = self.crud if hasattr(self, 'crud') else self context = Crud.CreateView.get_context_data( self, **kwargs) @@ -1165,7 +1187,8 @@ class MasterDetailCrud(Crud): try: parent_object = parent_model.objects.get(**params) - except Exception: + except Exception as e: + logger.error("- " + str(e)) raise Http404() else: parent_model = self.model