diff options
Diffstat (limited to 'django/utils/feedgenerator.py')
| -rw-r--r-- | django/utils/feedgenerator.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py index ec01d02697..a0f63901c7 100644 --- a/django/utils/feedgenerator.py +++ b/django/utils/feedgenerator.py @@ -102,8 +102,8 @@ class SyndicationFeed: 'feed_copyright': to_str(feed_copyright), 'id': feed_guid or link, 'ttl': to_str(ttl), + **kwargs, } - self.feed.update(kwargs) self.items = [] def add_item(self, title, link, description, author_email=None, @@ -119,7 +119,7 @@ class SyndicationFeed: return str(s) if s is not None else s if categories: categories = [to_str(c) for c in categories] - item = { + self.items.append({ 'title': to_str(title), 'link': iri_to_uri(link), 'description': to_str(description), @@ -135,9 +135,8 @@ class SyndicationFeed: 'categories': categories or (), 'item_copyright': to_str(item_copyright), 'ttl': to_str(ttl), - } - item.update(kwargs) - self.items.append(item) + **kwargs, + }) def num_items(self): return len(self.items) |
