feat: search case-insensitive

This commit is contained in:
moanos [he/him] 2024-11-07 22:13:55 +01:00
parent 2641b2e7bf
commit d96a44bbdd

View File

@ -14,7 +14,7 @@ class StatusInline(admin.StackedInline):
@admin.register(AdoptionNotice) @admin.register(AdoptionNotice)
class AdoptionNoticeAdmin(admin.ModelAdmin): class AdoptionNoticeAdmin(admin.ModelAdmin):
search_fields = ("name__contains", "description__contains") search_fields = ("name__icontains", "description__icontains")
inlines = [ inlines = [
StatusInline, StatusInline,
] ]
@ -53,7 +53,7 @@ class ReportAdoptionNoticeAdmin(admin.ModelAdmin):
@admin.register(RescueOrganization) @admin.register(RescueOrganization)
class RescueOrganizationAdmin(admin.ModelAdmin): class RescueOrganizationAdmin(admin.ModelAdmin):
search_fields = ("name__contains", ) search_fields = ("name__icontains", )
list_display = ("name", "trusted", "allows_using_materials", "website") list_display = ("name", "trusted", "allows_using_materials", "website")
list_filter = ("allows_using_materials", "trusted",) list_filter = ("allows_using_materials", "trusted",)