ignore la casse

This commit is contained in:
Jean-Marie Favreau 2023-11-18 19:17:54 +01:00
parent caa73bd1c2
commit cb134d04c1

View File

@ -432,7 +432,7 @@ class SimpleSearchEventFilter(django_filters.FilterSet):
def custom_filter(self, queryset, name, value): def custom_filter(self, queryset, name, value):
search_query = SearchQuery(value, config='french') search_query = SearchQuery(value, config='french')
qs = queryset.filter( qs = queryset.filter(
Q(title__contains=value) | Q(location__contains=value) | Q(description__contains=value)) Q(title__icontains=value) | Q(location__icontains=value) | Q(description__icontains=value))
for f in ["title", "location", "description"]: for f in ["title", "location", "description"]:
params = { f + "_hl": SearchHeadline(f, params = { f + "_hl": SearchHeadline(f,
search_query, search_query,