From d96a44bbdd6419a9deb8f42aebdf824cf8a15f70 Mon Sep 17 00:00:00 2001 From: moanos Date: Thu, 7 Nov 2024 22:13:55 +0100 Subject: [PATCH] feat: search case-insensitive --- src/fellchensammlung/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fellchensammlung/admin.py b/src/fellchensammlung/admin.py index 936e7a2..b461112 100644 --- a/src/fellchensammlung/admin.py +++ b/src/fellchensammlung/admin.py @@ -14,7 +14,7 @@ class StatusInline(admin.StackedInline): @admin.register(AdoptionNotice) class AdoptionNoticeAdmin(admin.ModelAdmin): - search_fields = ("name__contains", "description__contains") + search_fields = ("name__icontains", "description__icontains") inlines = [ StatusInline, ] @@ -53,7 +53,7 @@ class ReportAdoptionNoticeAdmin(admin.ModelAdmin): @admin.register(RescueOrganization) class RescueOrganizationAdmin(admin.ModelAdmin): - search_fields = ("name__contains", ) + search_fields = ("name__icontains", ) list_display = ("name", "trusted", "allows_using_materials", "website") list_filter = ("allows_using_materials", "trusted",)