diff --git a/base/templatetags/menus.py b/base/templatetags/menus.py index 2c9f00fb9..bd218fca3 100644 --- a/base/templatetags/menus.py +++ b/base/templatetags/menus.py @@ -3,6 +3,7 @@ import os import yaml from django import template from django.core.urlresolvers import reverse + from sapl.settings import BASE_DIR register = template.Library() diff --git a/comissoes/views.py b/comissoes/views.py index c530fd10b..55d7fd3d1 100644 --- a/comissoes/views.py +++ b/comissoes/views.py @@ -10,10 +10,10 @@ from django.views.generic.edit import FormMixin from vanilla import GenericView import sapl -from sapl.layout import form_actions from materia.models import Tramitacao from parlamentares.models import Filiacao from sapl.crud import build_crud +from sapl.layout import form_actions from .models import (CargoComissao, Comissao, Composicao, Participacao, Periodo, TipoComissao) diff --git a/materia/views.py b/materia/views.py index 53520f556..f7041e91c 100644 --- a/materia/views.py +++ b/materia/views.py @@ -18,12 +18,12 @@ from django.views.generic.edit import FormMixin from vanilla.views import GenericView import sapl -from sapl.layout import form_actions from comissoes.models import Comissao, Composicao from compilacao.views import IntegracaoTaView from norma.models import LegislacaoCitada, NormaJuridica, TipoNormaJuridica from parlamentares.models import Parlamentar, Partido from sapl.crud import build_crud +from sapl.layout import form_actions from sessao.models import AcompanharMateria from .models import (Anexada, Autor, Autoria, DespachoInicial, @@ -33,7 +33,6 @@ from .models import (Anexada, Autor, Autoria, DespachoInicial, TipoFimRelatoria, TipoMateriaLegislativa, TipoProposicao, Tramitacao, UnidadeTramitacao) - origem_crud = build_crud( Origem, 'origem', [ diff --git a/norma/views.py b/norma/views.py index 627fdcab0..386434477 100644 --- a/norma/views.py +++ b/norma/views.py @@ -13,10 +13,10 @@ from django.views.generic.edit import FormMixin from vanilla.views import GenericView import sapl -from sapl.layout import form_actions from compilacao.views import IntegracaoTaView from materia.models import MateriaLegislativa, TipoMateriaLegislativa from sapl.crud import build_crud +from sapl.layout import form_actions from .models import (AssuntoNorma, LegislacaoCitada, NormaJuridica, TipoNormaJuridica) diff --git a/parlamentares/views.py b/parlamentares/views.py index 3391ac1b0..e8981b595 100644 --- a/parlamentares/views.py +++ b/parlamentares/views.py @@ -14,8 +14,8 @@ from django.views.generic.edit import FormMixin from vanilla import GenericView import sapl -from sapl.layout import form_actions from sapl.crud import build_crud +from sapl.layout import form_actions from .models import (CargoMesa, Coligacao, ComposicaoMesa, Dependente, Filiacao, Legislatura, Mandato, NivelInstrucao, diff --git a/protocoloadm/views.py b/protocoloadm/views.py index b0c69bb1f..4861c0244 100644 --- a/protocoloadm/views.py +++ b/protocoloadm/views.py @@ -2,7 +2,7 @@ from datetime import date, datetime from re import sub from crispy_forms.helper import FormHelper -from crispy_forms.layout import (HTML, Field, Fieldset, Layout) +from crispy_forms.layout import HTML, Field, Fieldset, Layout from django import forms from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse @@ -19,9 +19,9 @@ from django.views.generic.edit import FormMixin from vanilla import GenericView import sapl -from sapl.layout import form_actions from materia.models import Proposicao, TipoMateriaLegislativa from sapl.crud import build_crud +from sapl.layout import form_actions from .models import (Autor, DocumentoAcessorioAdministrativo, DocumentoAdministrativo, Protocolo, @@ -614,7 +614,7 @@ class ProtocoloMateriaView(FormMixin, GenericView): numeracao = Protocolo.objects.all().aggregate(Max('numero')) if numeracao is None: - numero['numero__max'] = 0 + numeracao['numero__max'] = 0 protocolo = Protocolo() diff --git a/sapl/layout.py b/sapl/layout.py index e085a0a1e..ba9b43544 100644 --- a/sapl/layout.py +++ b/sapl/layout.py @@ -1,5 +1,5 @@ from crispy_forms.bootstrap import FormActions -from crispy_forms.layout import Submit, Layout, Div, Fieldset, HTML +from crispy_forms.layout import HTML, Div, Fieldset, Layout, Submit from django.utils.translation import ugettext as _ diff --git a/sessao/views.py b/sessao/views.py index b19a2121c..86e1cf05f 100644 --- a/sessao/views.py +++ b/sessao/views.py @@ -15,12 +15,12 @@ from django.views.generic.edit import FormMixin from rest_framework import generics import sapl -from sapl.layout import form_actions from materia.models import (Autoria, DocumentoAcessorio, TipoMateriaLegislativa, Tramitacao) from norma.models import NormaJuridica from parlamentares.models import Parlamentar from sapl.crud import build_crud +from sapl.layout import form_actions from sessao.serializers import SessaoPlenariaSerializer from .models import (AcompanharMateria, CargoMesa, ExpedienteMateria,