      """Feed of latest free comments on the current site"""
  
      comments_class = Comment
  
      def _get_lookup_kwargs(self):
          kwargs = LatestFreeCommentsFeed._get_lookup_kwargs(self)
          kwargs['is_removed__exact'] = False
          if settings.COMMENTS_BANNED_USERS_GROUP:
              kwargs['where'] = ['user_id NOT IN (SELECT user_id FROM auth_users_group WHERE group_id = %s)']
              kwargs['params'] = [COMMENTS_BANNED_USERS_GROUP]
          return kwargs
 
</s> remove         return self.comments_class.objects.filter(**self._get_lookup_kwargs())

    def _get_lookup_kwargs(self):
        return {
            'site__pk': settings.SITE_ID,
            'is_public__exact': True,
            'limit': 40,
        }
 </s> add         return self.comments_class.objects.filter(site__pk=settings.SITE_ID, is_public=True)[:40] </s> remove     """Feed of latest comments on the current site"""
 </s> add     "Feed of latest comments on the current site." </s> remove             kwargs['where'] = ['user_id NOT IN (SELECT user_id FROM auth_users_group WHERE group_id = %s)']
            kwargs['params'] = [COMMENTS_BANNED_USERS_GROUP]
        return kwargs
 </s> add             where = ['user_id NOT IN (SELECT user_id FROM auth_users_group WHERE group_id = %s)']
            params = [COMMENTS_BANNED_USERS_GROUP]
            qs = qs.extra(where=where, params=params)
        return qs
    def items(self):
        qs = LatestFreeCommentsFeed.items(self)
        qs = qs.filter(is_removed=False)
      """Feed of latest free comments on the current site"""
  
      comments_class = Comment
  
    def items(self):
        qs = LatestFreeCommentsFeed.items(self)
        qs = qs.filter(is_removed=False)
    def items(self):
        qs = LatestFreeCommentsFeed.items(self)
        qs = qs.filter(is_removed=False)
    def items(self):
        qs = LatestFreeCommentsFeed.items(self)
        qs = qs.filter(is_removed=False)
          if settings.COMMENTS_BANNED_USERS_GROUP:
              kwargs['where'] = ['user_id NOT IN (SELECT user_id FROM auth_users_group WHERE group_id = %s)']
              kwargs['params'] = [COMMENTS_BANNED_USERS_GROUP]
          return kwargs
keep keep keep keep replace replace replace keep keep keep keep
 Fixed #1981 -- Fixed bug in feeds.py for comments

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2983 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/contrib/comments/feeds.py