Ticket #8917: comments-ordering.diff

File comments-ordering.diff, 1.3 KB (added by Wilson Miner, 16 years ago)

Patch to reverse ordering of comments and add submit_date to admin list_display

  • Users/wilson/Development/django/trunk/django/contrib/comments/admin.py

     
    1616        ),
    1717     )
    1818
    19     list_display = ('name', 'content_type', 'object_pk', 'ip_address', 'is_public', 'is_removed')
     19    list_display = ('name', 'content_type', 'object_pk', 'ip_address', 'submit_date', 'is_public', 'is_removed')
    2020    list_filter = ('submit_date', 'site', 'is_public', 'is_removed')
    2121    date_hierarchy = 'submit_date'
    2222    search_fields = ('comment', 'user__username', 'user_name', 'user_email', 'user_url', 'ip_address')
  • Users/wilson/Development/django/trunk/django/contrib/comments/models.py

     
    6969
    7070    class Meta:
    7171        db_table = "django_comments"
    72         ordering = ('submit_date',)
     72        ordering = ('-submit_date',)
    7373        permissions = [("can_moderate", "Can moderate comments")]
    7474
    7575    def __unicode__(self):
Back to Top