Browse Source

Fix qa

pull/534/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
parent
commit
386628c2fe
  1. 2
      sapl/base/urls.py
  2. 12
      sapl/materia/tests/test_materia.py
  3. 3
      sapl/materia/urls.py
  4. 3
      sapl/materia/views.py
  5. 5
      sapl/parlamentares/views.py
  6. 7
      sapl/protocoloadm/views.py
  7. 1
      sapl/relatorios/views.py
  8. 2
      sapl/sessao/forms.py
  9. 9
      sapl/sessao/urls.py
  10. 13
      sapl/sessao/views.py
  11. 3
      sapl/utils.py

2
sapl/base/urls.py

@ -4,7 +4,7 @@ from django.views.generic.base import TemplateView
from .apps import AppConfig
from .forms import LoginForm
from .views import CasaLegislativaCrud, HelpView, SistemaView
from .views import CasaLegislativaCrud, HelpView
app_name = AppConfig.name

12
sapl/materia/tests/test_materia.py

@ -1,18 +1,16 @@
import pytest
from django.contrib.auth.models import User
from django.core.files.uploadedfile import SimpleUploadedFile
from django.core.urlresolvers import reverse
from model_mommy import mommy
from sapl.comissoes.models import Comissao, TipoComissao
from sapl.materia.models import (Anexada, Autor, Autoria, DespachoInicial,
DocumentoAcessorio, MateriaLegislativa,
Numeracao, Proposicao,
RegimeTramitacao, StatusTramitacao,
TipoAutor, TipoProposicao, TipoDocumento,
TipoMateriaLegislativa, Tramitacao,
UnidadeTramitacao)
Numeracao, Proposicao, RegimeTramitacao,
StatusTramitacao, TipoAutor, TipoDocumento,
TipoMateriaLegislativa, TipoProposicao,
Tramitacao, UnidadeTramitacao)
from sapl.norma.models import (LegislacaoCitada, NormaJuridica,
TipoNormaJuridica)

3
sapl/materia/urls.py

@ -34,7 +34,8 @@ urlpatterns = [
RelatoriaCrud.get_urls() +
DocumentoAcessorioCrud.get_urls())),
url(r'^confirmar/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})$',
url(r'''^confirmar/(?P<uidb64>[0-9A-Za-z_\-]+)/
(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})$''',
ConfirmarEmailView.as_view(), name='confirmar_email'),
url(r'^proposicao/', include(ProposicaoCrud.get_urls())),

3
sapl/materia/views.py

@ -18,8 +18,7 @@ from django.template import Context, loader
from django.utils.encoding import force_bytes
from django.utils.http import urlsafe_base64_decode, urlsafe_base64_encode
from django.utils.translation import ugettext_lazy as _
from django.views.generic import (CreateView, DetailView, ListView,
TemplateView, UpdateView)
from django.views.generic import CreateView, ListView, TemplateView, UpdateView
from django_filters.views import FilterView
from sapl.base.models import CasaLegislativa

5
sapl/parlamentares/views.py

@ -2,7 +2,6 @@ from django.contrib import messages
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
from django.core.urlresolvers import reverse_lazy
from django.shortcuts import redirect
from django.utils.datastructures import MultiValueDictKeyError
@ -10,8 +9,8 @@ from django.utils.translation import ugettext_lazy as _
from django.views.generic import FormView
from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView,
CrudDeleteView, CrudDetailView,
CrudListView, CrudUpdateView)
CrudDeleteView, CrudDetailView, CrudListView,
CrudUpdateView)
from sapl.crud.masterdetail import MasterDetailCrud
from sapl.utils import permissao_tb_aux, permissoes_parlamentares

7
sapl/protocoloadm/views.py

@ -24,10 +24,9 @@ from sapl.utils import (create_barcode, get_client_ip, permissoes_adm,
from .forms import (AnularProcoloAdmForm, DocumentoAcessorioAdministrativoForm,
DocumentoAdministrativoFilterSet,
DocumentoAdministrativoForm,
ProtocoloDocumentForm, ProtocoloFilterSet,
ProtocoloMateriaForm, TramitacaoAdmEditForm,
TramitacaoAdmForm)
DocumentoAdministrativoForm, ProtocoloDocumentForm,
ProtocoloFilterSet, ProtocoloMateriaForm,
TramitacaoAdmEditForm, TramitacaoAdmForm)
from .models import (Autor, DocumentoAcessorioAdministrativo,
DocumentoAdministrativo, Protocolo,
StatusTramitacaoAdministrativo,

1
sapl/relatorios/views.py

@ -53,7 +53,6 @@ def get_imagem(casa):
if casa.logotipo:
return casa.logotipo.path
else:
# TODO: recuperar de uma variavel de sistema
return STATIC_ROOT + '/img/brasao_transp.gif'

2
sapl/sessao/forms.py

@ -13,7 +13,7 @@ from sapl.materia.forms import MateriaLegislativaFilterSet
from sapl.materia.models import MateriaLegislativa, TipoMateriaLegislativa
from sapl.utils import RANGE_DIAS_MES, RANGE_MESES, autor_label, autor_modal
from .models import Bancada, ExpedienteMateria, SessaoPlenaria, OrdemDia
from .models import Bancada, ExpedienteMateria, OrdemDia, SessaoPlenaria
def pega_anos():

9
sapl/sessao/urls.py

@ -1,11 +1,10 @@
from django.conf.urls import include, url
from sapl.sessao.views import (AdicionarVariasMateriasExpediente,
AdicionarVariasMateriasOrdemDia,
BancadaCrud, CargoBancadaCrud,
ExpedienteMateriaCrud, ExpedienteView,
MateriaOrdemDiaCrud, MesaView, OradorCrud,
OradorExpedienteCrud, PainelView,
AdicionarVariasMateriasOrdemDia, BancadaCrud,
CargoBancadaCrud, ExpedienteMateriaCrud,
ExpedienteView, MateriaOrdemDiaCrud, MesaView,
OradorCrud, OradorExpedienteCrud, PainelView,
PautaExpedienteDetail, PautaOrdemDetail,
PautaSessaoDetailView, PautaSessaoListView,
PesquisarSessaoPlenariaView,

13
sapl/sessao/views.py

@ -10,7 +10,7 @@ from django.http.response import HttpResponseRedirect
from django.utils.datastructures import MultiValueDictKeyError
from django.utils.html import strip_tags
from django.utils.translation import ugettext_lazy as _
from django.views.generic import FormView, ListView, TemplateView
from django.views.generic import ListView, TemplateView
from django.views.generic.edit import FormMixin
from django_filters.views import FilterView
from rest_framework import generics
@ -20,18 +20,16 @@ from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView,
CrudUpdateView, make_pagination)
from sapl.crud.masterdetail import MasterDetailCrud
from sapl.materia.forms import pega_ultima_tramitacao
from sapl.materia.models import (Autoria, DocumentoAcessorio,
TipoMateriaLegislativa, Tramitacao)
from sapl.materia.models import Autoria, DocumentoAcessorio, Tramitacao
from sapl.materia.views import MateriaLegislativaPesquisaView
from sapl.norma.models import NormaJuridica
from sapl.parlamentares.models import Parlamentar
from sapl.sessao.serializers import SessaoPlenariaSerializer
from sapl.utils import permissao_tb_aux, permissoes_painel, permissoes_sessao
from .forms import (AdicionarVariasMateriasFilterSet,
BancadaForm, ExpedienteForm, ExpedienteMateriaForm,
ListMateriaForm, MesaForm,
OrdemDiaForm, PresencaForm,
from .forms import (AdicionarVariasMateriasFilterSet, BancadaForm,
ExpedienteForm, ExpedienteMateriaForm, ListMateriaForm,
MesaForm, OrdemDiaForm, PresencaForm,
SessaoPlenariaFilterSet, VotacaoEditForm, VotacaoForm,
VotacaoNominalForm)
from .models import (Bancada, CargoBancada, CargoMesa, ExpedienteMateria,
@ -2059,7 +2057,6 @@ class AdicionarVariasMateriasExpediente(MateriaLegislativaPesquisaView):
return kwargs
def get_context_data(self, **kwargs):
# import ipdb; ipdb.set_trace()
context = super(MateriaLegislativaPesquisaView,
self).get_context_data(**kwargs)

3
sapl/utils.py

@ -262,7 +262,8 @@ def permissoes_parlamentares():
lista_permissoes = []
try:
cts = ContentType.objects.filter(app_label='parlamentares')
perms_parlamentares = list(Permission.objects.filter(content_type__in=cts))
perms_parlamentares = list(Permission.objects.filter(
content_type__in=cts))
for p in perms_parlamentares:
lista_permissoes.append('parlamentares.' + p.codename)
except:

Loading…
Cancel
Save