              self._site = Site.objects.get_current()
          return "Latest comments on %s" % self._site.name
  
      def items(self):
          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,
          }
  
  class LatestCommentsFeed(LatestFreeCommentsFeed):
      """Feed of latest free comments on the current site"""
  
      comments_class = Comment
 
</s> remove     def _get_lookup_kwargs(self):
        kwargs = LatestFreeCommentsFeed._get_lookup_kwargs(self)
        kwargs['is_removed__exact'] = False
 </s> add     def items(self):
        qs = LatestFreeCommentsFeed.items(self)
        qs = qs.filter(is_removed=False) </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
        return self.comments_class.objects.filter(site__pk=settings.SITE_ID, is_public=True)[:40]
              self._site = Site.objects.get_current()
          return "Latest comments on %s" % self._site.name
  
      def items(self):
        return self.comments_class.objects.filter(site__pk=settings.SITE_ID, is_public=True)[:40]
        return self.comments_class.objects.filter(site__pk=settings.SITE_ID, is_public=True)[:40]
        return self.comments_class.objects.filter(site__pk=settings.SITE_ID, is_public=True)[:40]
        return self.comments_class.objects.filter(site__pk=settings.SITE_ID, is_public=True)[:40]
        return self.comments_class.objects.filter(site__pk=settings.SITE_ID, is_public=True)[:40]
        return self.comments_class.objects.filter(site__pk=settings.SITE_ID, is_public=True)[:40]
        return self.comments_class.objects.filter(site__pk=settings.SITE_ID, is_public=True)[:40]
        return self.comments_class.objects.filter(site__pk=settings.SITE_ID, is_public=True)[:40]
  
  class LatestCommentsFeed(LatestFreeCommentsFeed):
      """Feed of latest free comments on the current site"""
  
      comments_class = Comment
keep keep keep keep replace replace replace replace replace replace replace replace keep 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