Browse Source

Resolve detalhes da PEP8

pull/505/head
Eduardo Calil 9 years ago
parent
commit
26d1628f01
  1. 1
      sapl/parlamentares/views.py
  2. 14
      sapl/protocoloadm/views.py
  3. 1
      sapl/settings.py
  4. 2
      sapl/utils.py

1
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

14
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,

1
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',

2
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

Loading…
Cancel
Save