#14656: Atom1Feed should write atom:published element
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  nobody
  ttencate@…                         |         Status:  new
                   Type:  Bug        |      Component:  contrib.syndication
              Milestone:             |       Severity:  Normal
                Version:  1.2        |       Keywords:
             Resolution:             |      Has patch:  0
           Triage Stage:  Accepted   |    Needs tests:  0
    Needs documentation:  0          |  Easy pickings:  0
Patch needs improvement:  0          |
-------------------------------------+-------------------------------------
Changes (by floledermann):

 * easy:   => 0


Comment:

 Btw. a hacky workaround is monkeypatching the method:


 {{{
 from django.utils.feedgenerator import Atom1Feed, rfc3339_date


 # monkey patch buggy Atom implementation in Django
 Atom1Feed._add_item_elements = Atom1Feed.add_item_elements

 def atom1feed_add_item_elements_patched(self, handler, item, *args,
 **kwargs):
     if item['pubdate'] is not None:
         handler.addQuickElement(u"published",
 rfc3339_date(item['pubdate']).decode('utf-8'))
     # include args, kwargs for future compatibility
     self._add_item_elements(handler, item, *args, **kwargs)

 Atom1Feed.add_item_elements = atom1feed_add_item_elements_patched
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/14656#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to