From 4b1e38a6f5b0846edd62941fd9a23471c2a58cca Mon Sep 17 00:00:00 2001 From: vincent porte Date: Wed, 18 Dec 2024 11:52:32 +0100 Subject: [PATCH] add filter on approved field on Post and Topic --- lacommunaute/forum_conversation/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lacommunaute/forum_conversation/admin.py b/lacommunaute/forum_conversation/admin.py index f8dcac39..46730026 100644 --- a/lacommunaute/forum_conversation/admin.py +++ b/lacommunaute/forum_conversation/admin.py @@ -11,6 +11,8 @@ def get_actions(self, request): # the website inconsistent return [] + list_filter = BasePostAdmin.list_filter + ("approved",) + class PostInline(admin.StackedInline): model = Post @@ -30,7 +32,7 @@ class TopicAdmin(BaseTopicAdmin): inlines = [ PostInline, ] - list_filter = BaseTopicAdmin.list_filter + ("type",) + list_filter = BaseTopicAdmin.list_filter + ("type", "approved") class CertifiedPostAdmin(admin.ModelAdmin):