Browse files

Added a comments feed

Signed-off-by: Nathan Borror <nathan@playgroundblues.com>
  • Loading branch information...
1 parent 7353a9a commit 459f00278a404a7938e85332ae37e5ae085c750b @ericholscher ericholscher committed with Nathan Borror Feb 14, 2009
Showing with 18 additions and 2 deletions.
  1. +16 −1 blog/feeds.py
  2. +2 −1 blog/templates/feeds/posts_description.html
View
17 blog/feeds.py
@@ -39,4 +39,19 @@ def description(self, obj):
return "Posts recently categorized as %s" % obj.title
def items(self, obj):
- return obj.post_set.published()[:10]
+ return obj.post_set.published()[:10]
+
+class CommentsFeed(Feed):
+ _site = Site.objects.get_current()
+ title = '%s comment feed' % _site.name
+ description = '%s comments feed.' % _site.name
+
+ def link(self):
+ return reverse('blog_index')
+
+ def items(self):
+ return Comment.objects.all()[:10]
+
+ def item_pubdate(self, obj):
+ return obj.submit_date
+
View
3 blog/templates/feeds/posts_description.html
@@ -1 +1,2 @@
-{{ obj.tease }}
+{% load markup %}
+{{ obj.body|markdown }}

0 comments on commit 459f002

Please sign in to comment.