Browse Source

Pequenos ajustes

pull/776/head
Edward Ribeiro 8 years ago
parent
commit
1d52849fe9
  1. 3
      sapl/compilacao/views.py
  2. 7
      sapl/crud/base.py
  3. 2
      sapl/materia/views.py
  4. 3
      sapl/parlamentares/views.py
  5. 8
      sapl/rules/tests/test_rules.py
  6. 1
      scripts/lista_permissions_in_decorators.py

3
sapl/compilacao/views.py

@ -53,8 +53,7 @@ TipoNotaCrud = Crud.build(TipoNota, 'tipo_nota')
TipoVideCrud = Crud.build(TipoVide, 'tipo_vide')
TipoPublicacaoCrud = Crud.build(TipoPublicacao, 'tipo_publicacao')
VeiculoPublicacaoCrud = Crud.build(VeiculoPublicacao, 'veiculo_publicacao')
TipoDispositivoCrud = Crud.build(
TipoDispositivo, 'tipo_dispositivo')
TipoDispositivoCrud = Crud.build(TipoDispositivo, 'tipo_dispositivo')
logger = logging.getLogger(BASE_DIR.name)

7
sapl/crud/base.py

@ -16,20 +16,19 @@ from django.http.response import Http404
from django.shortcuts import redirect
from django.utils.decorators import classonlymethod
from django.utils.encoding import force_text
from django.utils.translation import string_concat
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import string_concat
from django.views.generic import (CreateView, DeleteView, DetailView, ListView,
UpdateView)
from django.views.generic.base import ContextMixin
from django.views.generic.list import MultipleObjectMixin
from sapl.crispy_layout_mixin import CrispyLayoutFormMixin, get_field_display
from sapl.rules.map_rules import (RP_ADD, RP_CHANGE, RP_DELETE,
RP_DETAIL, RP_LIST)
from sapl.rules.map_rules import (RP_ADD, RP_CHANGE, RP_DELETE, RP_DETAIL,
RP_LIST)
from sapl.settings import BASE_DIR
from sapl.utils import normalize
logger = logging.getLogger(BASE_DIR.name)
ACTION_LIST, ACTION_CREATE, ACTION_DETAIL, ACTION_UPDATE, ACTION_DELETE = \

2
sapl/materia/views.py

@ -84,7 +84,7 @@ class MateriaTaView(IntegracaoTaView):
class ProposicaoTaView(IntegracaoTaView):
model = Proposicao
model_type_foreignkey = TipoProposicao
# TODO implmentar o mapa de fields e utiliza-lo em IntegracaoTaView
# TODO implementar o mapa de fields e utiliza-lo em IntegracaoTaView
fields = {
}

3
sapl/parlamentares/views.py

@ -64,8 +64,7 @@ class ProposicaoParlamentarCrud(CrudBaseForListAndDetailExternalAppView):
class ListView(CrudBaseForListAndDetailExternalAppView.ListView):
def get_queryset(self):
return super().get_queryset().filter(
data_envio__isnull=False)
return super().get_queryset().filter(data_envio__isnull=False)
class ParticipacaoParlamentarCrud(CrudBaseForListAndDetailExternalAppView):

8
sapl/rules/tests/test_rules.py

@ -7,11 +7,11 @@ from django.utils import six
from django.utils.translation import ugettext_lazy as _
from sapl.base.models import CasaLegislativa, ProblemaMigracao
from sapl.compilacao.models import TipoDispositivo,\
PerfilEstruturalTextoArticulado, TipoDispositivoRelationship
from sapl.compilacao.models import (PerfilEstruturalTextoArticulado,
TipoDispositivo,
TipoDispositivoRelationship)
from sapl.materia.models import AcompanhamentoMateria
from sapl.rules import SAPL_GROUPS
from sapl.rules import map_rules
from sapl.rules import SAPL_GROUPS, map_rules
from sapl.test_urls import create_perms_post_migrate
from scripts.lista_permissions_in_decorators import \
lista_permissions_in_decorators

1
scripts/lista_permissions_in_decorators.py

@ -2,7 +2,6 @@ import ast
import inspect
import os
if __name__ == '__main__':
import django

Loading…
Cancel
Save