Make sure return values match title.
I received this error from the feeds: AttributeError at /feeds/news/ 'PressRelease' object has no attribute 'title' Request Method: GET Request URL: http://sfconservancy.org/feeds/news/ Django Version: 1.4.5 Exception Type: AttributeError 'PressRelease' object has no attribute 'title' Exception Location: /var/www/conservancy/feeds.py in item_title, line 46 I think this change fixes that.
This commit is contained in:
parent
527ad3087f
commit
252f29af81
1 changed files with 6 additions and 6 deletions
|
@ -43,10 +43,10 @@ class PressReleaseFeed(Feed):
|
|||
return PressRelease.objects.filter(pub_date__lte=datetime.now(),
|
||||
sites__id__exact=settings.SITE_ID).order_by('-pub_date')[:10]
|
||||
def item_title(self, item):
|
||||
return item.title
|
||||
return item.headline
|
||||
|
||||
def item_description(self, item):
|
||||
return item.title
|
||||
return item.summary
|
||||
|
||||
def item_pubdate(self, item):
|
||||
return item.pub_date
|
||||
|
@ -82,10 +82,10 @@ class OmnibusFeed(ConservancyFeedBase):
|
|||
author_name = "Software Freedom Conservancy"
|
||||
|
||||
def item_title(self, item):
|
||||
return item.title
|
||||
return item.headline
|
||||
|
||||
def item_description(self, item):
|
||||
return item.description
|
||||
return item.summary
|
||||
|
||||
def item_enclosure_mime_type(self): return "audio/mpeg"
|
||||
|
||||
|
@ -211,10 +211,10 @@ class BlogFeed(ConservancyFeedBase):
|
|||
return answer
|
||||
|
||||
def item_title(self, item):
|
||||
return item.title
|
||||
return item.headline
|
||||
|
||||
def item_description(self, item):
|
||||
return item.description
|
||||
return item.summary
|
||||
|
||||
def item_author_name(self, item):
|
||||
return item.author.formal_name
|
||||
|
|
Loading…
Reference in a new issue