Ticket #5766: comments-cleanup-r6522.diff

File comments-cleanup-r6522.diff, 1005 bytes (added by Ludvig Ericson <ludvig.ericson@…>, 17 years ago)
  • django/contrib/comments/feeds.py

     
    44from django.contrib.sites.models import Site
    55
    66class LatestFreeCommentsFeed(Feed):
    7     "Feed of latest comments on the current site."
     7    """Feed of latest free comments on the current site."""
    88
    99    comments_class = FreeComment
     10    comment_count_limit = 40
    1011
    1112    def title(self):
    1213        if not hasattr(self, '_site'):
     
    2728        return self.comments_class.objects.filter(site__pk=settings.SITE_ID, is_public=True)
    2829
    2930    def items(self):
    30         return self.get_query_set()[:40]
     31        return self.get_query_set()[:self.comment_count_limit]
    3132
    3233class LatestCommentsFeed(LatestFreeCommentsFeed):
    33     """Feed of latest free comments on the current site"""
     34    """Feed of latest comments on the current site."""
    3435
    3536    comments_class = Comment
    3637
Back to Top