From dc692c30749d314fb9adceb1be62c69e757e1e94 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Tue, 5 Apr 2016 08:34:00 -0300 Subject: [PATCH] =?UTF-8?q?Muda=20op=C3=A7=C3=B5es=20de=20ano=20na=20pesqu?= =?UTF-8?q?isa=20de=20Norma?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- norma/forms.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/norma/forms.py b/norma/forms.py index 4e3db8756..866c48ba8 100644 --- a/norma/forms.py +++ b/norma/forms.py @@ -49,6 +49,14 @@ class NormaJuridicaPesquisaForm(ModelForm): format='%d/%m/%Y', attrs={'class': 'dateinput'})) + ano = forms.ModelChoiceField( + label='Ano', + required=False, + queryset=NormaJuridica.objects.order_by('ano').values_list( + 'ano', flat=True).distinct(), + empty_label='Selecione' + ) + class Meta: model = NormaJuridica fields = ['tipo',