Ticket #16296: comment_order.patch
File comment_order.patch, 777 bytes (added by , 13 years ago) |
---|
-
models.py
10 10 from django.conf import settings 11 11 12 12 COMMENT_MAX_LENGTH = getattr(settings,'COMMENT_MAX_LENGTH',3000) 13 COMMENTS_ORDERING = getattr(settings, 'COMMENTS_ORDERING', ('submit_date',)) 14 if COMMENTS_ODERING = 'reverse': 15 COMMENTS_ORDERING = ('-submit_date') 13 16 14 17 class BaseCommentAbstractModel(models.Model): 15 18 """ … … 71 74 72 75 class Meta: 73 76 db_table = "django_comments" 74 ordering = ('submit_date',)77 ordering = COMMENTS_ORDERING 75 78 permissions = [("can_moderate", "Can moderate comments")] 76 79 verbose_name = _('comment') 77 80 verbose_name_plural = _('comments')