summaryrefslogtreecommitdiff
path: root/django/utils/feedgenerator.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/feedgenerator.py')
-rw-r--r--django/utils/feedgenerator.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py
index 4c5d515f41..2eb27a40b7 100644
--- a/django/utils/feedgenerator.py
+++ b/django/utils/feedgenerator.py
@@ -36,7 +36,7 @@ def get_tag_uri(url, date):
tag = re.sub('#', '/', tag)
return 'tag:' + tag
-class SyndicationFeed:
+class SyndicationFeed(object):
"Base class for all syndication feeds. Subclasses should provide write()"
def __init__(self, title, link, description, language=None, author_email=None,
author_name=None, author_link=None, subtitle=None, categories=None,
@@ -108,7 +108,7 @@ class SyndicationFeed:
else:
return datetime.datetime.now()
-class Enclosure:
+class Enclosure(object):
"Represents an RSS enclosure"
def __init__(self, url, length, mime_type):
"All args are expected to be Python Unicode objects"
@@ -126,6 +126,8 @@ class RssFeed(SyndicationFeed):
handler.addQuickElement(u"description", self.feed['description'])
if self.feed['language'] is not None:
handler.addQuickElement(u"language", self.feed['language'])
+ for cat in self.feed['categories']:
+ handler.addQuickElement(u"category", cat)
self.write_items(handler)
self.endChannelElement(handler)
handler.endElement(u"rss")