From cb134d04c14ce396bc9b4756a168a2184a6bed80 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Sat, 18 Nov 2023 19:17:54 +0100 Subject: [PATCH] ignore la casse --- src/agenda_culturel/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index fb1f134..e37997c 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -432,7 +432,7 @@ class SimpleSearchEventFilter(django_filters.FilterSet): def custom_filter(self, queryset, name, value): search_query = SearchQuery(value, config='french') 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"]: params = { f + "_hl": SearchHeadline(f, search_query,