Skip to content
Browse files

Made content take precedence over anything else

Content usually contains the full entry, summary and description are
  • Loading branch information...
1 parent 7e8c265 commit a1143bfbcc0b4ac24c3f5686660a6d8a62ae181d @brutasse brutasse committed
Showing with 10 additions and 5 deletions.
  1. +10 −5 django_website/aggregator/
15 django_website/aggregator/
@@ -124,14 +124,19 @@ def feed_updated(sender, notification, **kwargs):
log.error("Feed ID %s has an entry ('%s') without a link or guid. Skipping.",, title)
link = getattr(entry, "link", guid)
+ content = u''
if hasattr(entry, "summary"):
content = entry.summary
- elif hasattr(entry, "content"):
- content = entry.content[0].value
- elif hasattr(entry, "description"):
+ if hasattr(entry, "description"):
content = entry.description
- else:
- content = u""
+ # 'content' takes precedence on anything else. 'summary' and
+ # 'description' are usually truncated so it's safe to overwrite them
+ if hasattr(entry, "content"):
+ content = u''
+ for item in entry.content:
+ content += item.value
if entry.has_key('updated_parsed'):
date_modified = datetime.datetime(*entry.updated_parsed[:6])

3 comments on commit a1143bf

Django member

I had to remove that after complaints of broken feeds.


@jezdez do you have examples of impacted feeds?

Django member

Mind jumping on IRC quick?

Please sign in to comment.
Something went wrong with that request. Please try again.