|
@ -1,4 +1,5 @@ |
|
|
import json |
|
|
import json |
|
|
|
|
|
|
|
|
from django.contrib import messages |
|
|
from django.contrib import messages |
|
|
from django.contrib.auth.decorators import user_passes_test |
|
|
from django.contrib.auth.decorators import user_passes_test |
|
|
from django.core.exceptions import ObjectDoesNotExist |
|
|
from django.core.exceptions import ObjectDoesNotExist |
|
@ -8,8 +9,6 @@ from django.http import HttpResponse, JsonResponse |
|
|
from django.http.response import Http404, HttpResponseRedirect |
|
|
from django.http.response import Http404, HttpResponseRedirect |
|
|
from django.shortcuts import render |
|
|
from django.shortcuts import render |
|
|
from django.utils.translation import ugettext_lazy as _ |
|
|
from django.utils.translation import ugettext_lazy as _ |
|
|
from operator import itemgetter |
|
|
|
|
|
from sapl.utils import sort_lista_chave |
|
|
|
|
|
|
|
|
|
|
|
from sapl.crud.base import Crud |
|
|
from sapl.crud.base import Crud |
|
|
from sapl.painel.apps import AppConfig |
|
|
from sapl.painel.apps import AppConfig |
|
@ -17,7 +16,7 @@ from sapl.parlamentares.models import Votante |
|
|
from sapl.sessao.models import (ExpedienteMateria, OrdemDia, PresencaOrdemDia, |
|
|
from sapl.sessao.models import (ExpedienteMateria, OrdemDia, PresencaOrdemDia, |
|
|
RegistroVotacao, SessaoPlenaria, |
|
|
RegistroVotacao, SessaoPlenaria, |
|
|
SessaoPlenariaPresenca, VotoParlamentar) |
|
|
SessaoPlenariaPresenca, VotoParlamentar) |
|
|
from sapl.utils import filiacao_data, get_client_ip |
|
|
from sapl.utils import filiacao_data, get_client_ip, sort_lista_chave |
|
|
|
|
|
|
|
|
from .models import Cronometro |
|
|
from .models import Cronometro |
|
|
|
|
|
|
|
@ -238,6 +237,7 @@ def switch_painel(request): |
|
|
sessao.save() |
|
|
sessao.save() |
|
|
return JsonResponse({}) |
|
|
return JsonResponse({}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@user_passes_test(check_permission) |
|
|
@user_passes_test(check_permission) |
|
|
def verifica_painel(request): |
|
|
def verifica_painel(request): |
|
|
sessao = SessaoPlenaria.objects.get(id=request.GET['pk_sessao']) |
|
|
sessao = SessaoPlenaria.objects.get(id=request.GET['pk_sessao']) |
|
@ -324,7 +324,6 @@ def get_presentes(pk, response, materia): |
|
|
'materia_legislativa_texto': str(materia.materia) |
|
|
'materia_legislativa_texto': str(materia.materia) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
presentes_list = sort_lista_chave(presentes_list, 'nome') |
|
|
presentes_list = sort_lista_chave(presentes_list, 'nome') |
|
|
|
|
|
|
|
|
response.update({ |
|
|
response.update({ |
|
|