diff --git a/compilacao/forms.py b/compilacao/forms.py index e6b9ab3b4..851eec135 100644 --- a/compilacao/forms.py +++ b/compilacao/forms.py @@ -9,9 +9,9 @@ from django.forms.models import ModelForm from django.utils.translation import ugettext_lazy as _ from compilacao.models import (PARTICIPACAO_SOCIAL_CHOICES, Dispositivo, Nota, - TextoArticulado, TipoNota, TipoTextoArticulado, - TipoVide, Vide, TipoPublicacao, - VeiculoPublicacao, Publicacao) + Publicacao, TextoArticulado, TipoNota, + TipoPublicacao, TipoTextoArticulado, TipoVide, + VeiculoPublicacao, Vide) from compilacao.utils import YES_NO_CHOICES, FormLayout, to_column, to_row @@ -131,11 +131,12 @@ class TaForm(ModelForm): self.helper = FormHelper() self.helper.layout = FormLayout( Fieldset(_('Identificação Básica'), row1, css_class="large-12"), - Fieldset(TextoArticulado._meta.get_field( - 'ementa').verbose_name, Column('ementa'), css_class="large-12"), Fieldset( - TextoArticulado._meta.get_field( - 'observacao').verbose_name, Column('observacao'), css_class="large-12"), + TextoArticulado._meta.get_field('ementa').verbose_name, + Column('ementa'), css_class="large-12"), + Fieldset( + TextoArticulado._meta.get_field('observacao').verbose_name, + Column('observacao'), css_class="large-12"), ) diff --git a/parlamentares/views.py b/parlamentares/views.py index 61aa224cb..1f7e9ff14 100644 --- a/parlamentares/views.py +++ b/parlamentares/views.py @@ -11,7 +11,6 @@ from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from django.views.generic.edit import FormMixin from vanilla import GenericView -from django.core.exceptions import ObjectDoesNotExist import sapl from sapl.crud import build_crud diff --git a/sessao/serializers.py b/sessao/serializers.py index cf3fedadd..0a681d142 100644 --- a/sessao/serializers.py +++ b/sessao/serializers.py @@ -1,8 +1,10 @@ from rest_framework import serializers + from .models import SessaoPlenaria + class SessaoPlenariaSerializer(serializers.ModelSerializer): - class Meta: - model = SessaoPlenaria - fields = ('tipo', 'legislatura', 'sessao_legislativa') \ No newline at end of file + class Meta: + model = SessaoPlenaria + fields = ('tipo', 'legislatura', 'sessao_legislativa') diff --git a/sessao/urls.py b/sessao/urls.py index 497823a28..b92a1eec0 100644 --- a/sessao/urls.py +++ b/sessao/urls.py @@ -10,7 +10,7 @@ from sessao.views import (EditExpedienteOrdemDiaView, EditMateriaOrdemDiaView, OradorExpedienteView, PainelView, PautaSessaoDetailView, PautaSessaoListView, PresencaOrdemDiaView, PresencaView, ResumoView, - SessaoCadastroView, SessaoListView, + SessaoCadastroView, SessaoListView, SessaoPlenariaView, VotacaoEditView, VotacaoExpedienteEditView, VotacaoExpedienteView, VotacaoNominalEditView, @@ -94,7 +94,9 @@ urlpatterns_sessao = sessao_crud.urlpatterns + [ sessao_urls = urlpatterns_sessao, sessao_crud.namespace, sessao_crud.namespace -sessao_rest = [url(r'^sessao$', SessaoPlenariaView.as_view(), name='sessao_rest'),] +sessao_rest = [ + url(r'^sessao$', SessaoPlenariaView.as_view(), name='sessao_rest') +] urlpatterns = [ url(r'^sessao/', include(urlpatterns_sessao, diff --git a/sessao/views.py b/sessao/views.py index b18bfb598..92b721a4d 100644 --- a/sessao/views.py +++ b/sessao/views.py @@ -12,12 +12,13 @@ from django.utils.html import strip_tags from django.utils.translation import ugettext_lazy as _ from django.views.generic import ListView from django.views.generic.edit import FormMixin -from sessao.serializers import SessaoPlenariaSerializer from rest_framework import generics + import sapl from materia.models import Autoria, TipoMateriaLegislativa from parlamentares.models import Parlamentar from sapl.crud import build_crud +from sessao.serializers import SessaoPlenariaSerializer from .models import (CargoMesa, ExpedienteMateria, ExpedienteSessao, IntegranteMesa, MateriaLegislativa, Orador, @@ -2438,5 +2439,5 @@ class SessaoCadastroView(FormMixin, sessao_crud.CrudDetailView): class SessaoPlenariaView(generics.ListAPIView): - queryset = SessaoPlenaria.objects.select_related('sessao_legislativa').all() - serializer_class = SessaoPlenariaSerializer \ No newline at end of file + queryset = SessaoPlenaria.objects.all() + serializer_class = SessaoPlenariaSerializer