diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-11-14 05:15:40 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-11-14 05:15:40 +0000 |
| commit | 74865663bbaddf4d2d8cd5472e2f137ebe0ec347 (patch) | |
| tree | 791def3ff75381f689a7a33c69a518520dd18520 /django/utils | |
| parent | 7626cb058107ac1ecb0795162e4c9fc4f92356dd (diff) | |
Fixed #787 -- High-level syndication framework now picks up author details. Also updated documentation. Thanks, mattycakes
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/feedgenerator.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py index a8dd5c39df..22db5abe7f 100644 --- a/django/utils/feedgenerator.py +++ b/django/utils/feedgenerator.py @@ -58,7 +58,7 @@ class SyndicationFeed: self.items = [] def add_item(self, title, link, description, author_email=None, - author_name=None, pubdate=None, comments=None, + author_name=None, author_link=None, pubdate=None, comments=None, unique_id=None, enclosure=None, categories=()): """ Adds an item to the feed. All args are expected to be Python Unicode @@ -71,6 +71,7 @@ class SyndicationFeed: 'description': description, 'author_email': author_email, 'author_name': author_name, + 'author_link': author_link, 'pubdate': pubdate, 'comments': comments, 'unique_id': unique_id, @@ -226,6 +227,8 @@ class Atom1Feed(SyndicationFeed): handler.addQuickElement(u"name", item['author_name']) if item['author_email'] is not None: handler.addQuickElement(u"email", item['author_email']) + if item['author_link'] is not None: + handler.addQuickElement(u"uri", item['author_link']) handler.endElement(u"author") # Unique ID. |
