diff --git a/comments/admin.py b/comments/admin.py index 25c767aa4691c951af14d3c43bedf9ee032ec059..930ef7ae7001cb7b43746e01d81f77d67cf54f73 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)