summaryrefslogtreecommitdiff
path: root/django/utils/feedgenerator.py
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2006-06-19 15:23:57 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2006-06-19 15:23:57 +0000
commitadf4b9311d5d64a2bdd58da50271c121ea22e397 (patch)
treea69b3b023595cf1ce67a14c4c1ecd3290d94088e /django/utils/feedgenerator.py
parente976ed1f7910fad03704f88853c5c5b36cbab134 (diff)
downloaddjango-attic/multi-auth.tar.gz
multi-auth: Merged to [3151]archive/attic/multi-authattic/multi-auth
git-svn-id: http://code.djangoproject.com/svn/django/branches/multi-auth@3152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
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")