Skip to content

Commit

Permalink
Show comment post time as a readonly field on admin page (#1451)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninjaclasher authored Jun 13, 2020
1 parent f28cef2 commit a792999
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion judge/admin/comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a792999

Please sign in to comment.