From a79299979959aa0795c31ab59408dc333c642f91 Mon Sep 17 00:00:00 2001 From: Evan Zhang <29607503+Ninjaclasher@users.noreply.github.com> Date: Sat, 13 Jun 2020 14:28:15 -0400 Subject: [PATCH] Show comment post time as a readonly field on admin page (#1451) --- judge/admin/comments.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/judge/admin/comments.py b/judge/admin/comments.py index 22c52816ee..d01b561bfa 100644 --- a/judge/admin/comments.py +++ b/judge/admin/comments.py @@ -19,13 +19,14 @@ class Meta: class CommentAdmin(VersionAdmin): fieldsets = ( - (None, {'fields': ('author', 'page', 'parent', 'score', 'hidden')}), + (None, {'fields': ('author', 'page', 'parent', 'time', 'score', 'hidden')}), ('Content', {'fields': ('body',)}), ) list_display = ['author', 'linked_page', 'time'] search_fields = ['author__user__username', 'page', 'body'] actions = ['hide_comment', 'unhide_comment'] list_filter = ['hidden'] + readonly_fields = ['time'] actions_on_top = True actions_on_bottom = True form = CommentForm