9a43a0ef2602

Filtered spam from the RSS comment feeds.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 23 Jan 2009 23:02:53 -0500
parents c6f37ebd2f3e
children bfa2c0882ce6
branches/tags (none)
files rss/feeds.py

Changes

--- a/rss/feeds.py	Fri Jan 23 00:21:13 2009 -0500
+++ b/rss/feeds.py	Fri Jan 23 23:02:53 2009 -0500
@@ -39,11 +39,13 @@
     item_author_link = 'http://stevelosh.com'
     
     def items(self):
-        comments  = list(BlogComment.objects.order_by('-submitted')[:50])
-        comments += list(ProjectComment.objects.order_by('-submitted')[:50])
+        comments  = list(BlogComment.objects.filter(spam=False)
+                                            .order_by('-submitted')[:10])
+        comments += list(ProjectComment.objects.filter(spam=False)
+                                               .order_by('-submitted')[:10])
         comments.sort(key=operator.attrgetter('submitted'))
         comments.reverse()
-        return comments[:50]
+        return comments[:20]
     
     def item_pubdate(self, item):
         return item.submitted