Fixed #4323 -- Added the ability to display author names without email

addresses to RSS 2.0 feeds.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-05-26 10:36:36 +00:00
parent 3c948d45d2
commit 12771614db
2 changed files with 3 additions and 0 deletions

View File

@ -230,6 +230,7 @@ answer newbie questions, and generally made Django that much better:
viestards.lists@gmail.com
Milton Waddams
wam-djangobug@wamber.net
wangchun <yaohua2000@gmail.com>
Dan Watson <http://theidioteque.net/>
Chris Wesseling <Chris.Wesseling@cwi.nl>
charly.wilhelm@gmail.com

View File

@ -168,6 +168,8 @@ class Rss201rev2Feed(RssFeed):
(item['author_email'], item['author_name']))
elif item["author_email"]:
handler.addQuickElement(u"author", item["author_email"])
elif item["author_name"]:
handler.addQuickElement(u"dc:creator", item["author_name"], {"xmlns:dc": u"http://purl.org/dc/elements/1.1/"})
if item['pubdate'] is not None:
handler.addQuickElement(u"pubDate", rfc2822_date(item['pubdate']).decode('ascii'))