From 26d1628f01fa74d424a4af908d3f98e820516794 Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Thu, 14 Jul 2016 19:39:03 -0300 Subject: [PATCH] Resolve detalhes da PEP8 --- sapl/parlamentares/views.py | 1 - sapl/protocoloadm/views.py | 14 +++++++++----- sapl/settings.py | 1 + sapl/utils.py | 2 -- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/sapl/parlamentares/views.py b/sapl/parlamentares/views.py index 2dc3ab576..227bb1d38 100644 --- a/sapl/parlamentares/views.py +++ b/sapl/parlamentares/views.py @@ -1,5 +1,4 @@ from django.contrib import messages -from django.contrib.auth.decorators import user_passes_test from django.contrib.auth.mixins import PermissionRequiredMixin from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType diff --git a/sapl/protocoloadm/views.py b/sapl/protocoloadm/views.py index 2d26f9e78..da00163c1 100644 --- a/sapl/protocoloadm/views.py +++ b/sapl/protocoloadm/views.py @@ -173,7 +173,9 @@ class AnularProtocoloAdmView(PermissionRequiredMixin, CreateView): return redirect(self.get_success_url()) -class ProtocoloDocumentoView(PermissionRequiredMixin, FormValidMessageMixin, CreateView): +class ProtocoloDocumentoView(PermissionRequiredMixin, + FormValidMessageMixin, + CreateView): template_name = "protocoloadm/protocolar_documento.html" form_class = ProtocoloDocumentForm form_valid_message = _('Protocolo cadastrado com sucesso!') @@ -389,7 +391,8 @@ class ProposicaoDetailView(DetailView): return context -class PesquisarDocumentoAdministrativoView(PermissionRequiredMixin, FilterView): +class PesquisarDocumentoAdministrativoView(PermissionRequiredMixin, + FilterView): model = DocumentoAdministrativo filterset_class = DocumentoAdministrativoFilterSet paginate_by = 10 @@ -490,7 +493,8 @@ class DetailDocumentoAdministrativo(PermissionRequiredMixin, DetailView): 'pk': self.kwargs['pk']}) -class DocumentoAcessorioAdministrativoEditView(PermissionRequiredMixin, FormView): +class DocumentoAcessorioAdministrativoEditView(PermissionRequiredMixin, + FormView): template_name = "protocoloadm/documento_acessorio_administrativo_edit.html" permission_required = permissoes_adm() @@ -550,8 +554,8 @@ class DocumentoAcessorioAdministrativoView(PermissionRequiredMixin, FormView): doc_acessorio = DocumentoAcessorioAdministrativo.objects.filter( documento_id=kwargs['pk']) if not doc_acessorio: - doc_ace_null = _('Nenhum documento acessório \ - cadastrado para este processo.') + doc_ace_null = _('Nenhum documento acessório' + + 'cadastrado para este processo.') return self.render_to_response({'pk': kwargs['pk'], 'doc': doc, diff --git a/sapl/settings.py b/sapl/settings.py index 96dee01eb..fb7fc4bb9 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -38,6 +38,7 @@ LOGIN_URL = '/login/?next=' # SAPL business apps in dependency order SAPL_APPS = ( 'sapl.base', + 'sapl.crud', 'sapl.parlamentares', 'sapl.comissoes', 'sapl.materia', diff --git a/sapl/utils.py b/sapl/utils.py index 2bfc9f69c..088319563 100644 --- a/sapl/utils.py +++ b/sapl/utils.py @@ -1,4 +1,3 @@ -import os.path from datetime import date from functools import wraps @@ -8,7 +7,6 @@ from django.conf import settings from django.contrib import admin from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType -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