diff --git a/legacy/migration.py b/legacy/migration.py index e358f9675..677e66b95 100644 --- a/legacy/migration.py +++ b/legacy/migration.py @@ -11,8 +11,8 @@ from model_mommy import mommy from comissoes.models import Composicao, Participacao from parlamentares.models import Parlamentar -from sessao.models import SessaoPlenaria from sapl.utils import appconfs +from sessao.models import SessaoPlenaria # BASE ###################################################################### diff --git a/painel/views.py b/painel/views.py index f46de2240..763d56cca 100644 --- a/painel/views.py +++ b/painel/views.py @@ -3,7 +3,7 @@ from django.core import serializers from django.http import HttpResponse, JsonResponse from django.shortcuts import render -from parlamentares.models import Filiacao, Parlamentar +from parlamentares.models import Filiacao from sessao.models import (OrdemDia, PresencaOrdemDia, RegistroVotacao, SessaoPlenaria, SessaoPlenariaPresenca, VotoParlamentar) @@ -35,7 +35,7 @@ def json_votacao(request): # Magic! # http://stackoverflow.com/questions/15507171/django-filter-query-foreign-key # recuperar pela votacao.id - voto_parlamentar = VotoParlamentar.objects.filter(votacao_id = votacao.id) + voto_parlamentar = VotoParlamentar.objects.filter(votacao_id=votacao.id) votos = {} for vp in voto_parlamentar: votos[vp.parlamentar.nome_parlamentar] = vp.voto @@ -60,10 +60,10 @@ def json_votacao(request): for p in presenca_ordem_dia: nome_parlamentar = p.parlamentar.nome_parlamentar presentes_ordem_dia.append( - {'nome': nome_parlamentar, - 'partido': parlamentar_partido[nome_parlamentar], - 'voto': votos.get(nome_parlamentar, '-')}) - + {'nome': nome_parlamentar, + 'partido': parlamentar_partido[nome_parlamentar], + 'voto': votos.get(nome_parlamentar, '-')}) + total_votos = votacao.numero_votos_sim + \ votacao.numero_votos_nao + votacao.numero_abstencoes diff --git a/sapl/settings.py b/sapl/settings.py index bb30ea750..9ed9b7149 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -24,7 +24,6 @@ SECRET_KEY = '!9g1-#la+#(oft(v-y1qhy$jk-2$24pdk69#b_jfqyv!*%a_)t' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -TEMPLATE_DEBUG = DEBUG ALLOWED_HOSTS = ['*'] diff --git a/sapl/test_general.py b/sapl/test_general.py index 92e1f8c22..35587f3c9 100644 --- a/sapl/test_general.py +++ b/sapl/test_general.py @@ -15,6 +15,6 @@ def test_str_sanity(): try: str(obj) except Exception as exc: - msg = '%s.%s.__str__ has is broken.' % ( + msg = '%s.%s.__str__ is broken.' % ( model.__module__, model.__name__) raise AssertionError(msg, exc) from exc