Fixed <published> attribute in Atom feed entries
This commit is contained in:
parent
8b18122cfd
commit
6b2a2a5232
1 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,7 @@ class FeedEntry(object):
|
|||
# optional
|
||||
self.__atom_category = None
|
||||
self.__atom_contributor = None
|
||||
self.__atom_published = None
|
||||
self.__atom_source = None
|
||||
self.__atom_rights = None
|
||||
|
||||
|
@ -157,6 +158,10 @@ class FeedEntry(object):
|
|||
email = etree.SubElement(contrib, 'url')
|
||||
email.text = c.get('uri')
|
||||
|
||||
if self.__atom_published:
|
||||
published = etree.SubElement(entry, 'published')
|
||||
published.text = self.__atom_published.isoformat()
|
||||
|
||||
if self.__atom_rights:
|
||||
rights = etree.SubElement(feed, 'rights')
|
||||
rights.text = self.__atom_rights
|
||||
|
|
Loading…
Reference in a new issue