Browse Source

ajuste autopep8 feito pela IDE

pull/2827/head
Leandro Roberto 5 years ago
parent
commit
df59ca3fb4
  1. 73
      sapl/base/forms.py

73
sapl/base/forms.py

@ -767,7 +767,7 @@ class RelatorioDocumentosAcessoriosFilterSet(django_filters.FilterSet):
fields = ['tipo', 'materia__tipo', 'data']
def __init__(self, *args, **kwargs):
super(
RelatorioDocumentosAcessoriosFilterSet, self
).__init__(*args, **kwargs)
@ -775,12 +775,12 @@ class RelatorioDocumentosAcessoriosFilterSet(django_filters.FilterSet):
self.filters['tipo'].label = 'Tipo de Documento'
self.filters['materia__tipo'].label = 'Tipo de Matéria do Documento'
self.filters['data'].label = 'Período (Data Inicial - Data Final)'
self.form.fields['tipo'].required = True
row0 = to_row([('tipo', 6),
('materia__tipo', 6)])
row1 = to_row([('data', 12)])
buttons = FormActions(
@ -794,16 +794,15 @@ class RelatorioDocumentosAcessoriosFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
self.form.helper.form_method = 'GET'
self.form.helper.layout = Layout(
Fieldset(_('Pesquisa'),
row0, row1,
buttons)
row0, row1,
buttons)
)
@ -839,8 +838,7 @@ class RelatorioAtasFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
@ -850,6 +848,7 @@ class RelatorioAtasFilterSet(django_filters.FilterSet):
row1, buttons, )
)
def ultimo_ano_com_norma():
anos_normas = choice_anos_com_normas()
@ -889,8 +888,7 @@ class RelatorioNormasMesFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
@ -933,8 +931,7 @@ class EstatisticasAcessoNormasForm(Form):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.helper = SaplFormHelper()
@ -986,8 +983,7 @@ class RelatorioNormasVigenciaFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
@ -1016,15 +1012,16 @@ class RelatorioPresencaSessaoFilterSet(django_filters.FilterSet):
super(RelatorioPresencaSessaoFilterSet, self).__init__(
*args, **kwargs)
self.form.fields['exibir_ordem_dia'] = forms.BooleanField(required=False,
self.form.fields['exibir_ordem_dia'] = forms.BooleanField(required=False,
label='Exibir presença das Ordens do Dia')
self.form.initial['exibir_ordem_dia'] = True
self.form.initial['exibir_ordem_dia'] = True
self.filters['data_inicio'].label = 'Período (Inicial - Final)'
self.form.fields['legislatura'].required = True
tipo_sessao_ordinaria = self.filters['tipo'].queryset.filter(nome='Ordinária')
tipo_sessao_ordinaria = self.filters['tipo'].queryset.filter(
nome='Ordinária')
if tipo_sessao_ordinaria:
self.form.initial['tipo'] = tipo_sessao_ordinaria.first()
@ -1045,8 +1042,7 @@ class RelatorioPresencaSessaoFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
@ -1114,8 +1110,7 @@ class RelatorioHistoricoTramitacaoFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
@ -1170,8 +1165,7 @@ class RelatorioDataFimPrazoTramitacaoFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
@ -1216,8 +1210,7 @@ class RelatorioReuniaoFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
@ -1261,8 +1254,7 @@ class RelatorioAudienciaFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
@ -1277,8 +1269,8 @@ class RelatorioAudienciaFilterSet(django_filters.FilterSet):
class RelatorioMateriasTramitacaoFilterSet(django_filters.FilterSet):
materia__ano = django_filters.ChoiceFilter(required=True,
label='Ano da Matéria',
choices=choice_anos_com_materias)
label='Ano da Matéria',
choices=choice_anos_com_materias)
tramitacao__unidade_tramitacao_destino = django_filters.ModelChoiceFilter(
queryset=UnidadeTramitacao.objects.all(),
@ -1323,8 +1315,7 @@ class RelatorioMateriasTramitacaoFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
@ -1364,8 +1355,7 @@ class RelatorioMateriasPorAnoAutorTipoFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
@ -1377,7 +1367,6 @@ class RelatorioMateriasPorAnoAutorTipoFilterSet(django_filters.FilterSet):
)
class RelatorioMateriasPorAutorFilterSet(django_filters.FilterSet):
autoria__autor = django_filters.CharFilter(widget=forms.HiddenInput())
@ -1420,8 +1409,7 @@ class RelatorioMateriasPorAutorFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
@ -1538,7 +1526,8 @@ class ConfiguracoesAppForm(ModelForm):
if not self.is_valid():
return cleaned_data
mostrar_brasao_painel = self.cleaned_data.get('mostrar_brasao_painel', False)
mostrar_brasao_painel = self.cleaned_data.get(
'mostrar_brasao_painel', False)
casa = CasaLegislativa.objects.first()
if not casa:
@ -1776,8 +1765,7 @@ class RelatorioHistoricoTramitacaoAdmFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()
@ -1831,8 +1819,7 @@ class RelatorioNormasPorAutorFilterSet(django_filters.FilterSet):
],
Submit('pesquisar', _('Pesquisar'), css_class='float-right',
onclick='return true;'),
css_class='form-group row justify-content-between'
,
css_class='form-group row justify-content-between',
)
self.form.helper = SaplFormHelper()

Loading…
Cancel
Save