From c07c6e8372a5405da8947cd340a2ebe452dab950 Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Mon, 8 Jan 2018 14:00:20 +0100 Subject: [PATCH] Update comments admin --- comments/admin.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/comments/admin.py b/comments/admin.py index 25c767aa4..930ef7ae7 100644 --- a/comments/admin.py +++ b/comments/admin.py @@ -15,11 +15,18 @@ def comment_is_vetted(comment): return comment.status is STATUS_VETTED +def comment_is_anonymous(comment): + '''Check if comment is vetted.''' + return comment.anonymous + + class CommentAdmin(GuardedModelAdmin): - list_display = (comment_opening, 'author', 'date_submitted', comment_is_vetted) + list_display = ( + comment_opening, 'author', 'date_submitted', comment_is_vetted, comment_is_anonymous) date_hierarchy = 'date_submitted' list_filter = ('status',) comment_is_vetted.boolean = True + comment_is_anonymous.boolean = True admin.site.register(Comment, CommentAdmin) -- GitLab