Modified the feed behavior for blogs and newsletters to always use the full content...
authorJoseph Spiros <joseph.spiros@ithinksw.com>
Thu, 6 Jan 2011 19:23:19 +0000 (14:23 -0500)
committerJoseph Spiros <joseph.spiros@ithinksw.com>
Thu, 6 Jan 2011 19:23:19 +0000 (14:23 -0500)
I am of the opinion that people using feed readers should not have to click through to the website to read the full text of either.

contrib/penfield/models.py

index d3eea16..9f1b61b 100644 (file)
@@ -197,7 +197,7 @@ class BlogView(MultiView, FeedMultiViewMixin):
        def add_item(self, feed, obj, kwargs=None):
                defaults = {
                        'title': obj.title,
        def add_item(self, feed, obj, kwargs=None):
                defaults = {
                        'title': obj.title,
-                       'description': obj.excerpt or obj.content,
+                       'description': obj.content,
                        'author_name': obj.author.get_full_name(),
                        'pubdate': obj.date
                }
                        'author_name': obj.author.get_full_name(),
                        'pubdate': obj.date
                }
@@ -429,7 +429,7 @@ class NewsletterView(MultiView, FeedMultiViewMixin):
                        'title': obj.title,
                        'author_name': ', '.join([author.get_full_name() for author in obj.authors.all()]),
                        'pubdate': obj.date,
                        'title': obj.title,
                        'author_name': ', '.join([author.get_full_name() for author in obj.authors.all()]),
                        'pubdate': obj.date,
-                       'description': obj.lede or obj.full_text,
+                       'description': obj.full_text,
                        'categories': [tag.name for tag in obj.tags.all()]
                }
                defaults.update(kwargs or {})
                        'categories': [tag.name for tag in obj.tags.all()]
                }
                defaults.update(kwargs or {})