Commits

Ian Lewis committed a362972

Fixed feeds because they were horribly broken

  • Participants
  • Parent commits 03ff842

Comments (0)

Files changed (2)

 
 class LatestEnglishBlogEntries(Feed):
     title="Ian Lewis' Blog"
-    #link=reverse('blog_page', kwargs={'locale':'en'})
-    link="/en/"
     description="The latest blog posts from Ian Lewis' blog"
 
+    def link(obj):
+        return reverse('blog_page', kwargs={'locale':'en'})
+
     def items(self, obj):
         return Post.objects.published().filter(locale='en')[:10]
 
-class LatestJapaneseBlogEntries(Feed):
-    title=u"イアンルイスのブログ"
-    #link=reverse("blog_page", kwargs={"locale":"jp"})
-    link="/jp/"
-    description=u"イアンルイスのブログの最新エントリ"
-
-    def items(self, obj):
-        return Post.objects.published().filter(locale="jp")
-
     def item_author_name(self, item):
         return item.author.get_full_name()
 
         return item.create_date
 
     def item_categories(self, item):
-        return parse_tag_input(item.tags)[:10]
+        return parse_tag_input(item.tags)
+
+class LatestJapaneseBlogEntries(Feed):
+    title=u"イアンルイスのブログ"
+    description=u"イアンルイスのブログの最新エントリ"
+    
+    def link(obj):
+        return reverse('blog_page', kwargs={'locale':'jp'})
+
+    def items(self, obj):
+        return Post.objects.published().filter(locale="jp")[:10]
+
+    def item_author_name(self, item):
+        return item.author.get_full_name()
+
+    def item_author_email(self, item):
+        return item.author.email
+
+    def item_author_link(self, item):
+        return reverse('main_page')
+
+    def item_pubdate(self, item):
+        return item.create_date
+
+    def item_categories(self, item):
+        return parse_tag_input(item.tags)

lifestream/rss.py

 
   def items(self):
     return Item.objects.published()[:10]
+
+  def item_pubdate(self, item):
+      return item.date
+
+  def item_categories(self, item):
+      def item_categories(self, item):
+        return [tag.name for tag in item.tag_set]
+