From fbb814bca8885f8be4b7bc7b37c72817d26480f1 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Wed, 28 Aug 2019 11:32:08 +0200 Subject: [PATCH] See #890: added django admin module for reports --- api/funkwhale_api/moderation/admin.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/api/funkwhale_api/moderation/admin.py b/api/funkwhale_api/moderation/admin.py index 9f8340030..4017ab86d 100644 --- a/api/funkwhale_api/moderation/admin.py +++ b/api/funkwhale_api/moderation/admin.py @@ -30,6 +30,28 @@ class InstancePolicyAdmin(admin.ModelAdmin): list_select_related = True + +@admin.register(models.Report) +class ReportAdmin(admin.ModelAdmin): + list_display = [ + "uuid", + "submitter", + "type", + "assigned_to", + "is_handled", + "creation_date", + "handled_date", + ] + list_filter = [ + "type", + "is_handled", + ] + search_fields = [ + "summary", + ] + list_select_related = True + + @admin.register(models.UserFilter) class UserFilterAdmin(admin.ModelAdmin): list_display = ["uuid", "user", "target_artist", "creation_date"]