new file: news/__init__.py
[univ_ap.git] / news / filters.py
1 import django_filters
2 from models import News
3
4 class NewsFilter(django_filters.FilterSet):
5 titre = django_filters.CharFilter(name="titre", lookup_type="icontains")
6 date_fin_gte = django_filters.DateFilter(name='date_fin', lookup_type='gte')
7 class Meta:
8 model = News
9 fields = ['titre', 'categorie','id','categorie_dossier','date_fin']