Browse Source

Conserta erros de QA

pull/1000/head
Marcio Mazza 8 years ago
parent
commit
39d0645c92
  1. 3
      sapl/base/search_indexes.py
  2. 1
      sapl/compilacao/templatetags/compilacao_filters.py
  3. 2
      sapl/crispy_layout_mixin.py
  4. 2
      sapl/legacy/migration.py
  5. 3
      sapl/materia/models.py
  6. 7
      sapl/materia/signals.py
  7. 7
      sapl/materia/urls.py
  8. 24
      sapl/materia/views.py
  9. 4
      sapl/norma/models.py
  10. 5
      sapl/norma/signals.py
  11. 1
      sapl/norma/views.py
  12. 1
      sapl/parlamentares/views.py
  13. 11
      sapl/relatorios/views.py

3
sapl/base/search_indexes.py

@ -1,8 +1,9 @@
import os.path
import textract
import textract
from django.template import Context, loader
from haystack import indexes
from sapl.materia.models import DocumentoAcessorio, MateriaLegislativa
from sapl.norma.models import NormaJuridica

1
sapl/compilacao/templatetags/compilacao_filters.py

@ -296,6 +296,7 @@ def urldetail_content_type(obj):
def list(obj):
return [obj, ]
@register.filter
def can_use_dynamic_editing(texto_articulado, user):
return texto_articulado.can_use_dynamic_editing(user)

2
sapl/crispy_layout_mixin.py

@ -1,12 +1,12 @@
from math import ceil
import rtyaml
from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import HTML, Div, Fieldset, Layout, Submit
from django import template
from django.utils import formats
from django.utils.translation import ugettext as _
import rtyaml
def heads_and_tails(list_of_lists):

2
sapl/legacy/migration.py

@ -19,7 +19,7 @@ from model_mommy.mommy import foreign_key_required, make
from sapl.base.models import Autor, ProblemaMigracao
from sapl.comissoes.models import Comissao, Composicao, Participacao
from sapl.legacy.models import Protocolo as ProtocoloLegado
from sapl.materia.models import (Proposicao, StatusTramitacao, TipoDocumento,
from sapl.materia.models import (StatusTramitacao, TipoDocumento,
TipoMateriaLegislativa, TipoProposicao,
Tramitacao)
from sapl.norma.models import (AssuntoNorma, NormaJuridica,

3
sapl/materia/models.py

@ -1,5 +1,6 @@
from datetime import datetime
import reversion
from django.contrib.auth.models import Group
from django.contrib.contenttypes.fields import GenericRelation
from django.contrib.contenttypes.models import ContentType
@ -7,7 +8,6 @@ from django.db import models
from django.utils import formats
from django.utils.translation import ugettext_lazy as _
from model_utils import Choices
import reversion
from sapl.base.models import Autor
from sapl.comissoes.models import Comissao
@ -18,7 +18,6 @@ from sapl.utils import (RANGE_ANOS, YES_NO_CHOICES, SaplGenericForeignKey,
SaplGenericRelation, restringe_tipos_de_arquivo_txt,
texto_upload_path)
EM_TRAMITACAO = [(1, 'Sim'),
(0, 'Não')]

7
sapl/materia/signals.py

@ -1,10 +1,11 @@
from django.db.models.signals import post_delete, post_save
from sapl.settings import PROJECT_DIR
from subprocess import PIPE, call
from threading import Thread
from django.db.models.signals import post_delete, post_save
from sapl.settings import PROJECT_DIR
from .models import MateriaLegislativa, DocumentoAcessorio
from .models import DocumentoAcessorio, MateriaLegislativa
class UpdateIndexCommand(Thread):

7
sapl/materia/urls.py

@ -4,10 +4,9 @@ from sapl.materia.views import (AcompanhamentoConfirmarView,
AcompanhamentoExcluirView,
AcompanhamentoMateriaView,
AdicionarVariasAutorias, AnexadaCrud,
AssuntoMateriaCrud,
AutoriaCrud, ConfirmarProposicao,
CriarProtocoloMateriaView, DespachoInicialCrud,
DocumentoAcessorioCrud,
AssuntoMateriaCrud, AutoriaCrud,
ConfirmarProposicao, CriarProtocoloMateriaView,
DespachoInicialCrud, DocumentoAcessorioCrud,
DocumentoAcessorioEmLoteView,
LegislacaoCitadaCrud, MateriaAssuntoCrud,
MateriaLegislativaCrud,

24
sapl/materia/views.py

@ -43,21 +43,19 @@ from sapl.utils import (TURNO_TRAMITACAO_CHOICES, YES_NO_CHOICES, autor_label,
from .forms import (AcessorioEmLoteFilterSet, AcompanhamentoMateriaForm,
AdicionarVariasAutoriasFilterSet, DespachoInicialForm,
DocumentoAcessorioForm,
MateriaAssuntoForm, MateriaLegislativaFilterSet,
MateriaSimplificadaForm, PrimeiraTramitacaoEmLoteFilterSet,
ReceberProposicaoForm, RelatoriaForm,
TramitacaoEmLoteFilterSet, filtra_tramitacao_destino,
DocumentoAcessorioForm, MateriaAssuntoForm,
MateriaLegislativaFilterSet, MateriaSimplificadaForm,
PrimeiraTramitacaoEmLoteFilterSet, ReceberProposicaoForm,
RelatoriaForm, TramitacaoEmLoteFilterSet,
filtra_tramitacao_destino,
filtra_tramitacao_destino_and_status,
filtra_tramitacao_status)
from .models import (AssuntoMateria, AcompanhamentoMateria,
Anexada, Autoria, DespachoInicial,
DocumentoAcessorio, MateriaLegislativa,
MateriaAssunto, Numeracao, Orgao,
Origem, Proposicao, RegimeTramitacao, Relatoria,
StatusTramitacao, TipoDocumento, TipoFimRelatoria,
TipoMateriaLegislativa, TipoProposicao, Tramitacao,
UnidadeTramitacao)
from .models import (AcompanhamentoMateria, Anexada, AssuntoMateria, Autoria,
DespachoInicial, DocumentoAcessorio, MateriaAssunto,
MateriaLegislativa, Numeracao, Orgao, Origem, Proposicao,
RegimeTramitacao, Relatoria, StatusTramitacao,
TipoDocumento, TipoFimRelatoria, TipoMateriaLegislativa,
TipoProposicao, Tramitacao, UnidadeTramitacao)
AssuntoMateriaCrud = Crud.build(AssuntoMateria, 'assunto_materia')

4
sapl/norma/models.py

@ -7,8 +7,8 @@ from model_utils import Choices
from sapl.compilacao.models import TextoArticulado
from sapl.materia.models import MateriaLegislativa
from sapl.utils import (RANGE_ANOS, YES_NO_CHOICES, texto_upload_path,
restringe_tipos_de_arquivo_txt)
from sapl.utils import (RANGE_ANOS, YES_NO_CHOICES,
restringe_tipos_de_arquivo_txt, texto_upload_path)
@reversion.register()

5
sapl/norma/signals.py

@ -1,8 +1,9 @@
from django.db.models.signals import post_delete, post_save
from sapl.settings import PROJECT_DIR
from subprocess import PIPE, call
from threading import Thread
from django.db.models.signals import post_delete, post_save
from sapl.settings import PROJECT_DIR
from .models import NormaJuridica

1
sapl/norma/views.py

@ -4,6 +4,7 @@ from django.http import JsonResponse
from django.utils.translation import ugettext_lazy as _
from django.views.generic.base import RedirectView
from django_filters.views import FilterView
from sapl.base.models import AppConfig
from sapl.compilacao.views import IntegracaoTaView
from sapl.crud.base import (RP_DETAIL, RP_LIST, Crud, CrudAux,

1
sapl/parlamentares/views.py

@ -22,7 +22,6 @@ from .models import (CargoMesa, Coligacao, ComposicaoColigacao, ComposicaoMesa,
NivelInstrucao, Parlamentar, Partido, SessaoLegislativa,
SituacaoMilitar, TipoAfastamento, TipoDependente, Votante)
CargoMesaCrud = CrudAux.build(CargoMesa, 'cargo_mesa')
PartidoCrud = CrudAux.build(Partido, 'partidos')
SessaoLegislativaCrud = CrudAux.build(SessaoLegislativa, 'sessao_legislativa')

11
sapl/relatorios/views.py

@ -8,15 +8,14 @@ from sapl.base.models import Autor, CasaLegislativa
from sapl.comissoes.models import Comissao
from sapl.materia.models import (Autoria, MateriaLegislativa, Numeracao,
Tramitacao, UnidadeTramitacao)
from sapl.parlamentares.models import (CargoMesa, ComposicaoMesa, Filiacao,
Parlamentar)
from sapl.parlamentares.models import CargoMesa, Filiacao, Parlamentar
from sapl.protocoloadm.models import (DocumentoAdministrativo, Protocolo,
TramitacaoAdministrativo)
from sapl.sessao.models import (ExpedienteMateria, ExpedienteSessao,
IntegranteMesa, Orador,
OradorExpediente, OrdemDia, PresencaOrdemDia,
RegistroVotacao, SessaoPlenaria,
SessaoPlenariaPresenca, TipoExpediente)
IntegranteMesa, Orador, OradorExpediente,
OrdemDia, PresencaOrdemDia, RegistroVotacao,
SessaoPlenaria, SessaoPlenariaPresenca,
TipoExpediente)
from sapl.settings import STATIC_ROOT
from sapl.utils import UF

Loading…
Cancel
Save