- return self.issue_archive_page.render_to_response(node, request, extra_context=context)
-
- def get_obj_description(self, obj):
- return obj.lede or obj.full_text
\ No newline at end of file
+ return self.issue_archive_page.render_to_response(request, extra_context=context)
+
+ def add_item(self, feed, obj, kwargs=None):
+ title = loader.get_template("penfield/feeds/newsletter_article/title.html")
+ description = loader.get_template("penfield/feeds/newsletter_article/description.html")
+ defaults = {
+ 'title': title.render(Context({'article': obj})),
+ 'author_name': ', '.join([author.get_full_name() for author in obj.authors.all()]),
+ 'pubdate': obj.date,
+ 'description': description.render(Context({'article': obj})),
+ 'categories': [tag.name for tag in obj.tags.all()]
+ }
+ defaults.update(kwargs or {})
+ super(NewsletterView, self).add_item(feed, obj, defaults)
+
+ def get_feed(self, feed_type, extra_context, kwargs=None):
+ title = self.newsletter.title
+
+ defaults = {
+ 'title': title
+ }
+ defaults.update(kwargs or {})
+ return super(NewsletterView, self).get_feed(feed_type, extra_context, defaults)