Browse Source

Resolve erros apontados pelos testes automaticos. Por exemplo, ordenacao dos imports

pull/282/head
Eduardo Calil 9 years ago
parent
commit
965fb5e72b
  1. 14
      materia/forms.py
  2. 11
      materia/views.py

14
materia/forms.py

@ -1,27 +1,25 @@
import django_filters
from crispy_forms.helper import FormHelper from crispy_forms.helper import FormHelper
from crispy_forms.layout import HTML, Button, Column, Fieldset, Layout, Submit from crispy_forms.layout import HTML, Button, Column, Fieldset, Layout, Submit
from django import forms from django import forms
from django.db.models import Max
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from django_filters import FilterSet from django.db.models import Max
from django.forms import ModelForm from django.forms import ModelForm
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django_filters import FilterSet
import django_filters
import crispy_layout_mixin import crispy_layout_mixin
import sapl import sapl
from crispy_layout_mixin import form_actions from crispy_layout_mixin import form_actions
from norma.models import LegislacaoCitada, TipoNormaJuridica from norma.models import LegislacaoCitada, TipoNormaJuridica
from sapl.settings import MAX_DOC_UPLOAD_SIZE
from parlamentares.models import Parlamentar, Partido from parlamentares.models import Parlamentar, Partido
from sapl.settings import MAX_DOC_UPLOAD_SIZE
from .models import (AcompanhamentoMateria, Anexada, Autor, Autoria, from .models import (AcompanhamentoMateria, Anexada, Autor, Autoria,
DespachoInicial, DocumentoAcessorio, MateriaLegislativa, DespachoInicial, DocumentoAcessorio, MateriaLegislativa,
Numeracao, Origem, Proposicao, Relatoria, Numeracao, Origem, Proposicao, Relatoria,
StatusTramitacao, TipoAutor, StatusTramitacao, TipoAutor, TipoMateriaLegislativa,
TipoMateriaLegislativa, Tramitacao, UnidadeTramitacao) Tramitacao, UnidadeTramitacao)
def em_tramitacao(): def em_tramitacao():

11
materia/views.py

@ -1,5 +1,3 @@
from django_filters.views import FilterView
from datetime import datetime from datetime import datetime
from random import choice from random import choice
from string import ascii_letters, digits from string import ascii_letters, digits
@ -13,6 +11,7 @@ from django.shortcuts import redirect
from django.template import Context, loader from django.template import Context, loader
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.views.generic import CreateView, FormView, ListView, TemplateView from django.views.generic import CreateView, FormView, ListView, TemplateView
from django_filters.views import FilterView
from base.models import CasaLegislativa from base.models import CasaLegislativa
from comissoes.models import Comissao, Composicao from comissoes.models import Comissao, Composicao
@ -25,12 +24,12 @@ from sapl.utils import get_base_url
from .forms import (AcompanhamentoMateriaForm, AutoriaForm, from .forms import (AcompanhamentoMateriaForm, AutoriaForm,
DespachoInicialForm, DocumentoAcessorioForm, DespachoInicialForm, DocumentoAcessorioForm,
FormularioCadastroForm, FormularioSimplificadoForm, FormularioCadastroForm, FormularioSimplificadoForm,
filtra_tramitacao_status, filtra_tramitacao_destino,
filtra_tramitacao_destino_and_status,
LegislacaoCitadaForm, MateriaAnexadaForm, LegislacaoCitadaForm, MateriaAnexadaForm,
MateriaLegislativaPesquisaFields, NumeracaoForm, MateriaLegislativaPesquisaFields, NumeracaoForm,
ProposicaoForm, RelatoriaForm, TramitacaoForm ProposicaoForm, RelatoriaForm, TramitacaoForm,
) filtra_tramitacao_destino,
filtra_tramitacao_destino_and_status,
filtra_tramitacao_status)
from .models import (AcompanhamentoMateria, Anexada, Autor, Autoria, from .models import (AcompanhamentoMateria, Anexada, Autor, Autoria,
DespachoInicial, DocumentoAcessorio, MateriaLegislativa, DespachoInicial, DocumentoAcessorio, MateriaLegislativa,
Numeracao, Orgao, Origem, Proposicao, RegimeTramitacao, Numeracao, Orgao, Origem, Proposicao, RegimeTramitacao,

Loading…
Cancel
Save