Dedebug filtre recherche annee_scol

This commit is contained in:
Evarin 2017-06-20 00:24:48 +02:00
parent 4ce14f0f4a
commit b145fc8e2e

View file

@ -25,7 +25,7 @@ class SearchForm(forms.Form):
type_stage = forms.ChoiceField(label="Type de stage", choices=([('', u'')] type_stage = forms.ChoiceField(label="Type de stage", choices=([('', u'')]
+ list(TYPE_STAGE_OPTIONS)), + list(TYPE_STAGE_OPTIONS)),
required=False) required=False)
annee_scol = forms.ChoiceField(label="Année d'étude", choices=([('', u'')] niveau_scol = forms.ChoiceField(label="Année d'étude", choices=([('', u'')]
+ list(NIVEAU_SCOL_OPTIONS)), + list(NIVEAU_SCOL_OPTIONS)),
required=False) required=False)
@ -97,8 +97,8 @@ def cherche(**kwargs):
if field_relevant('type_stage'): if field_relevant('type_stage'):
filtres &= Q(type_stage=kwargs["type_stage"]) filtres &= Q(type_stage=kwargs["type_stage"])
if field_relevant('annee_scol'): if field_relevant('niveau_scol'):
filtres &= Q(annee_scol=kwargs["annee_scol"]) filtres &= Q(niveau_scol=kwargs["niveau_scol"])
# Type de lieu # Type de lieu
if field_relevant('type_lieu'): if field_relevant('type_lieu'):