Browse Source

Arruma problema nas Choices do Ano da Materia

pull/282/head
Eduardo Calil 9 years ago
parent
commit
e3667cabd8
  1. 9
      materia/forms.py

9
materia/forms.py

@ -13,6 +13,7 @@ import sapl
from crispy_layout_mixin import form_actions
from norma.models import LegislacaoCitada, TipoNormaJuridica
from sapl.settings import MAX_DOC_UPLOAD_SIZE
from sapl.utils import RANGE_ANOS
from .models import (AcompanhamentoMateria, Anexada, Autor, Autoria,
DespachoInicial, DocumentoAcessorio, MateriaLegislativa,
@ -20,6 +21,9 @@ from .models import (AcompanhamentoMateria, Anexada, Autor, Autoria,
Tramitacao)
ANO_VAZIO = [('', '---------')] + RANGE_ANOS
def em_tramitacao():
return [('', 'Tanto Faz'),
(True, 'Sim'),
@ -622,6 +626,11 @@ class MateriaLegislativaFilterSet(django_filters.FilterSet):
ementa = django_filters.CharFilter(lookup_expr='icontains')
ano = django_filters.ChoiceFilter(required=False,
label=u'Ano da Matéria',
choices=ANO_VAZIO,
help_text="")
class Meta:
model = MateriaLegislativa
fields = ['numero',

Loading…
Cancel
Save