feat: add search for text

This commit is contained in:
moanos [he/him] 2024-11-07 23:16:47 +01:00
parent d96a44bbdd
commit 3269d5a39a

View File

@ -58,6 +58,11 @@ class RescueOrganizationAdmin(admin.ModelAdmin):
list_filter = ("allows_using_materials", "trusted",) list_filter = ("allows_using_materials", "trusted",)
@admin.register(Text)
class TextAdmin(admin.ModelAdmin):
search_fields = ("title__icontains", "text_code__icontains",)
admin.site.register(Animal) admin.site.register(Animal)
admin.site.register(Species) admin.site.register(Species)
admin.site.register(Location) admin.site.register(Location)
@ -65,7 +70,6 @@ admin.site.register(Rule)
admin.site.register(Image) admin.site.register(Image)
admin.site.register(ModerationAction) admin.site.register(ModerationAction)
admin.site.register(Language) admin.site.register(Language)
admin.site.register(Text)
admin.site.register(Announcement) admin.site.register(Announcement)
admin.site.register(AdoptionNoticeStatus) admin.site.register(AdoptionNoticeStatus)
admin.site.register(Subscriptions) admin.site.register(Subscriptions)