Why does Django Atom1Feed use atom: updated instead of atom: published?

I made an Atom feed in Django using a class that looks something like this:

class AtomFeed(Feed):

    feed_type = feedgenerator.Atom1Feed

    # ...

    def item_pubdate(self, post):
        return datetime.datetime(post.date.year, post.date.month, post.date.day)

The resulting XML for the element:

<entry>
  <title>..</title>
  <link href="..." rel="alternate"></link>
  <updated>2010-10-18T00:00:00+02:00</updated>
  <author><name>...</name></author>
  <id>...</id>
  <summary type="html">...</summary>
</entry>

It should be noted that the date is indicated in the element atom:updated, not in the element atom:published.

The RFC clearly tells me that this is not the intended use:

The atom: updated element is a Date construct indicating the most recent point in time when a post or feed has been changed in such a way that the publisher considers significant. Therefore, not all modifications necessarily lead to a modified atom: an updated value.

While:

": " Date, , .

, . , Google Reader updated , . .

Django :

django/utils/feedgenerator.py:331

if item['pubdate'] is not None:
    handler.addQuickElement(u"updated", rfc3339_date(item['pubdate']).decode('utf-8'))

, published.

​​Django? Atom RFC? - ?

+3
1

. Atom RFC , Django; . Django.

, , ! ^ _ ^

0

Source: https://habr.com/ru/post/1774052/


All Articles