Browse Source

Make QA (almost) happy

pull/153/head
Edward Ribeiro 9 years ago
parent
commit
06ab6dd0ce
  1. 3
      base/views.py
  2. 13
      compilacao/views.py
  3. 3
      parlamentares/views.py

3
base/views.py

@ -1,3 +1,5 @@
import os
from crispy_forms.helper import FormHelper from crispy_forms.helper import FormHelper
from crispy_forms.layout import HTML, ButtonHolder, Fieldset, Layout, Submit from crispy_forms.layout import HTML, ButtonHolder, Fieldset, Layout, Submit
from django import forms from django import forms
@ -9,7 +11,6 @@ from django.views.generic.edit import FormMixin
from vanilla import GenericView from vanilla import GenericView
import sapl import sapl
import os
from .models import CasaLegislativa from .models import CasaLegislativa

13
compilacao/views.py

@ -1,6 +1,6 @@
import sys
from collections import OrderedDict from collections import OrderedDict
from datetime import datetime, timedelta from datetime import datetime, timedelta
import sys
from braces.views import FormMessagesMixin from braces.views import FormMessagesMixin
from django import forms from django import forms
@ -21,15 +21,14 @@ from django.views.generic.edit import CreateView, DeleteView, UpdateView
from django.views.generic.list import ListView from django.views.generic.list import ListView
from compilacao import utils from compilacao import utils
from compilacao.forms import NotaForm, TaForm, TipoTaForm, VideForm,\ from compilacao.forms import (NotaForm, PublicacaoForm, TaForm, TipoTaForm,
PublicacaoForm VideForm)
from compilacao.models import (Dispositivo, Nota, from compilacao.models import (Dispositivo, Nota,
PerfilEstruturalTextoArticulado, PerfilEstruturalTextoArticulado, Publicacao,
TextoArticulado, TipoDispositivo, TipoNota, TextoArticulado, TipoDispositivo, TipoNota,
TipoPublicacao, TipoTextoArticulado, TipoVide, TipoPublicacao, TipoTextoArticulado, TipoVide,
VeiculoPublicacao, Vide, Publicacao) VeiculoPublicacao, Vide)
from compilacao.utils import build_crud, NO_ENTRIES_MSG from compilacao.utils import NO_ENTRIES_MSG, build_crud
DISPOSITIVO_SELECT_RELATED = ( DISPOSITIVO_SELECT_RELATED = (
'tipo_dispositivo', 'tipo_dispositivo',

3
parlamentares/views.py

@ -1,3 +1,4 @@
import os
from re import sub from re import sub
from crispy_forms.helper import FormHelper from crispy_forms.helper import FormHelper
@ -12,7 +13,6 @@ from django.views.generic.edit import FormMixin
from vanilla import GenericView from vanilla import GenericView
import sapl import sapl
import os
from sapl.crud import build_crud from sapl.crud import build_crud
from .models import (CargoMesa, Coligacao, ComposicaoMesa, Dependente, from .models import (CargoMesa, Coligacao, ComposicaoMesa, Dependente,
@ -474,7 +474,6 @@ class ParlamentaresEditarView(FormMixin, GenericView):
parlamentar.fotografia = None parlamentar.fotografia = None
parlamentar.save() parlamentar.save()
return self.form_valid(form) return self.form_valid(form)
else: else:
return self.render_to_response( return self.render_to_response(

Loading…
Cancel
Save