diff --git a/sapl/base/views.py b/sapl/base/views.py index e04c9e0af..c52b5b6fa 100644 --- a/sapl/base/views.py +++ b/sapl/base/views.py @@ -3,8 +3,8 @@ from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.views.generic.base import TemplateView -from sapl.crud.base import Crud, CrudBaseMixin, CrudCreateView,\ - CrudDetailView, CrudUpdateView +from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView, + CrudDetailView, CrudUpdateView) from sapl.utils import permissao_tb_aux from .forms import CasaLegislativaForm diff --git a/sapl/comissoes/views.py b/sapl/comissoes/views.py index 7051d3b15..4a23a49aa 100644 --- a/sapl/comissoes/views.py +++ b/sapl/comissoes/views.py @@ -1,12 +1,12 @@ -from django.core.urlresolvers import reverse from django.contrib.auth.mixins import PermissionRequiredMixin +from django.core.urlresolvers import reverse from django.views.generic import ListView from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView, - CrudUpdateView, CrudDeleteView) + CrudDeleteView, CrudUpdateView) from sapl.crud.masterdetail import MasterDetailCrud from sapl.materia.models import Tramitacao -from sapl.utils import permissoes_comissoes, permissao_tb_aux +from sapl.utils import permissao_tb_aux, permissoes_comissoes from .models import (CargoComissao, Comissao, Composicao, Participacao, Periodo, TipoComissao) diff --git a/sapl/materia/views.py b/sapl/materia/views.py index 8076bc49a..21f7de316 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -18,12 +18,13 @@ from django_filters.views import FilterView from sapl.base.models import CasaLegislativa from sapl.compilacao.views import IntegracaoTaView from sapl.crispy_layout_mixin import SaplFormLayout, form_actions, to_row -from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView, CrudListView, - CrudUpdateView, CrudDeleteView, make_pagination) +from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView, + CrudDeleteView, CrudListView, CrudUpdateView, + make_pagination) from sapl.crud.masterdetail import MasterDetailCrud from sapl.norma.models import LegislacaoCitada from sapl.utils import (autor_label, autor_modal, get_base_url, - permissoes_materia, permissao_tb_aux) + permissao_tb_aux, permissoes_materia) from .forms import (AcompanhamentoMateriaForm, AnexadaForm, AutoriaForm, DespachoInicialForm, DocumentoAcessorioForm, diff --git a/sapl/parlamentares/views.py b/sapl/parlamentares/views.py index f6abb062c..2dc3ab576 100644 --- a/sapl/parlamentares/views.py +++ b/sapl/parlamentares/views.py @@ -9,11 +9,10 @@ from django.utils.datastructures import MultiValueDictKeyError from django.utils.translation import ugettext_lazy as _ from django.views.generic import FormView -from sapl.crud.base import (Crud, CrudCreateView, CrudListView, CrudUpdateView, - CrudBaseMixin, CrudDeleteView) +from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView, + CrudDeleteView, CrudListView, CrudUpdateView) from sapl.crud.masterdetail import MasterDetailCrud - -from sapl.utils import permissoes_parlamentares, permissao_tb_aux +from sapl.utils import permissao_tb_aux, permissoes_parlamentares from .forms import (ComposicaoColigacaoForm, FiliacaoForm, LegislaturaForm, ParlamentarCreateForm, ParlamentarForm) diff --git a/sapl/protocoloadm/views.py b/sapl/protocoloadm/views.py index 82ecc22c2..2d26f9e78 100644 --- a/sapl/protocoloadm/views.py +++ b/sapl/protocoloadm/views.py @@ -13,11 +13,12 @@ from django.views.generic import CreateView, DetailView, FormView, ListView from django.views.generic.base import TemplateView from django_filters.views import FilterView -from sapl.crud.base import (Crud, CrudBaseMixin, CrudListView, make_pagination, - CrudCreateView, CrudUpdateView, CrudDeleteView) +from sapl.crud.base import (Crud, CrudBaseMixin, CrudCreateView, + CrudDeleteView, CrudListView, CrudUpdateView, + make_pagination) from sapl.materia.models import Proposicao, TipoMateriaLegislativa -from sapl.utils import (create_barcode, get_client_ip, permissoes_protocoloadm, - permissoes_adm) +from sapl.utils import (create_barcode, get_client_ip, permissoes_adm, + permissoes_protocoloadm) from .forms import (AnularProcoloAdmForm, DocumentoAcessorioAdministrativoForm, DocumentoAdministrativoFilterSet, diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index e26de79f1..47b4aac4b 100644 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -23,7 +23,7 @@ from sapl.materia.models import (Autoria, DocumentoAcessorio, from sapl.norma.models import NormaJuridica from sapl.parlamentares.models import Parlamentar from sapl.sessao.serializers import SessaoPlenariaSerializer -from sapl.utils import permissoes_sessao, permissoes_painel, permissao_tb_aux +from sapl.utils import permissao_tb_aux, permissoes_painel, permissoes_sessao from .forms import (BancadaForm, ExpedienteForm, ExpedienteMateriaForm, ListMateriaForm, MateriaOrdemDiaForm, MesaForm, diff --git a/sapl/utils.py b/sapl/utils.py index 9ad97a9a2..2bfc9f69c 100644 --- a/sapl/utils.py +++ b/sapl/utils.py @@ -1,6 +1,6 @@ +import os.path from datetime import date from functools import wraps -import os.path import magic from django.apps import apps @@ -12,7 +12,6 @@ from django.core.checks import Warning, register from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from floppyforms import ClearableFileInput -import magic def get_settings_auth_user_model(): diff --git a/scripts/inicializa_grupos_autorizacoes.py b/scripts/inicializa_grupos_autorizacoes.py index 6ce8e9be8..21d43808f 100644 --- a/scripts/inicializa_grupos_autorizacoes.py +++ b/scripts/inicializa_grupos_autorizacoes.py @@ -1,4 +1,4 @@ -from django.contrib.auth.models import User, Group, Permission +from django.contrib.auth.models import Group, Permission, User from django.contrib.contenttypes.models import ContentType