Ticket #4323: 4323.diff
File 4323.diff, 1.1 KB (added by , 18 years ago) |
---|
-
django/utils/feedgenerator.py
121 121 def write(self, outfile, encoding): 122 122 handler = SimplerXMLGenerator(outfile, encoding) 123 123 handler.startDocument() 124 handler.startElement(u"rss", {u"version": self._version })124 handler.startElement(u"rss", {u"version": self._version, u"xmlns:dc": u"http://purl.org/dc/elements/1.1/"}}) 125 125 handler.startElement(u"channel", {}) 126 126 handler.addQuickElement(u"title", self.feed['title']) 127 127 handler.addQuickElement(u"link", self.feed['link']) … … 168 168 (item['author_email'], item['author_name'])) 169 169 elif item["author_email"]: 170 170 handler.addQuickElement(u"author", item["author_email"]) 171 elif item["author_name"]: 172 handler.addQuickElement(u"dc:creator", item["author_name"]) 171 173 172 174 if item['pubdate'] is not None: 173 175 handler.addQuickElement(u"pubDate", rfc2822_date(item['pubdate']).decode('ascii'))