Code

Ticket #8917: 8917.diff

File 8917.diff, 758 bytes (added by arien, 6 years ago)

Reverse ordering of comments in the admin and add submit_date to admin list_display.

Line 
1Index: django/contrib/comments/admin.py
2===================================================================
3--- django/contrib/comments/admin.py    (revision 8975)
4+++ django/contrib/comments/admin.py    (working copy)
5@@ -16,9 +16,10 @@
6         ),
7      )
8 
9-    list_display = ('name', 'content_type', 'object_pk', 'ip_address', 'is_public', 'is_removed')
10+    list_display = ('name', 'content_type', 'object_pk', 'ip_address', 'submit_date', 'is_public', 'is_removed')
11     list_filter = ('submit_date', 'site', 'is_public', 'is_removed')
12     date_hierarchy = 'submit_date'
13+    ordering = ('-submit_date',)
14     search_fields = ('comment', 'user__username', 'user_name', 'user_email', 'user_url', 'ip_address')
15 
16 admin.site.register(Comment, CommentsAdmin)