Ticket #8253: r8319_atom.patch

File r8319_atom.patch, 1.1 KB (added by eibaan@…, 7 years ago)
  • django/utils/feedgenerator.py

     
    266266        self.write_items(handler)
    267267        handler.endElement(u"feed")
    268268
    269     def root_element_attributes(self):
     269    def root_attributes(self):
    270270        if self.feed['language'] is not None:
    271271            return {u"xmlns": self.ns, u"xml:lang": self.feed['language']}
    272272        else:
  • tests/regressiontests/syndication/tests.py

     
    3636       
    3737        feed = doc.firstChild
    3838        self.assertEqual(feed.nodeName, 'feed')
     39        self.assertEqual(feed.getAttribute('xmlns'), 'http://www.w3.org/2005/Atom')
    3940        self.assertChildNodes(feed, ['title', 'link', 'id', 'updated', 'entry'])       
    4041       
    4142        entries = feed.getElementsByTagName('entry')
Back to Top