From 12771614db6e82a9f6eeb836d963a4c0c1f74f82 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sat, 26 May 2007 10:36:36 +0000 Subject: [PATCH] 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 --- AUTHORS | 1 + django/utils/feedgenerator.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/AUTHORS b/AUTHORS index cd54dbad088..fedbd746846 100644 --- a/AUTHORS +++ b/AUTHORS @@ -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 Dan Watson Chris Wesseling charly.wilhelm@gmail.com diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py index aa315b52923..2c82e9a37a0 100644 --- a/django/utils/feedgenerator.py +++ b/django/utils/feedgenerator.py @@ -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'))