Django

Code

Ticket #3958 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

little changes for conformance to ATOM & RSS specs

Reported by: Baptiste <baptiste.goupil@gmail.com> Assigned to: adrian
Milestone: Component: RSS framework
Version: SVN Keywords: rss, atom, feedgenerator
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

A patch for the feedgenerator that adds <lastBuildDate> to RSS feeds (similar to the ATOM <updated>) and <subtitle> to ATOM feeds (similar to the RSS <description>).

Attachments

feedgenerator.diff (1.1 kB) - added by Baptiste <baptiste.goupil@gmail.com> on 04/07/07 17:46:40.
the patch
feedgenerator.2.diff (0.6 kB) - added by Baptiste <baptiste.goupil@gmail.com> on 04/08/07 04:09:11.
the patch without the atom subtitle
feedgenerator.3.diff (1.7 kB) - added by Baptiste <baptiste.goupil@gmail.com> on 04/08/07 04:16:03.
And a bonus patch that sets the <subtitle> to the given argument subtitle if it exists or the description if not, since the <subtitle> is almost the description. Nothing is broken, and that allows to use the same code for ATOM & RSS feeds.

Change History

04/07/07 17:46:40 changed by Baptiste <baptiste.goupil@gmail.com>

  • attachment feedgenerator.diff added.

the patch

04/07/07 19:12:40 changed by Simon G. <dev@simon.net.nz>

  • needs_better_patch changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

04/07/07 22:30:38 changed by mtredinnick

  • needs_better_patch set to 1.
  • stage changed from Ready for checkin to Accepted.

Subtitle does not have the same meaning as description. So that part of the patch is not appropriate. We already handle the subtitle element for Atom feeds and it's uses the subtitle attribute on the Feed subclass the client writes.

04/08/07 04:07:51 changed by Baptiste <baptiste.goupil@gmail.com>

Well, the spec says :
"The "atom:subtitle" element is a Text construct that conveys a human-readable description or subtitle for a feed."
So yes, I think it is the equivalent of <description>.
But anyway, I have just noticed that we could specify the <subtitle> for ATOM feeds - like you said, my mistake -, so I can manage that, but we could do better that two different arguments for a same element...

04/08/07 04:09:11 changed by Baptiste <baptiste.goupil@gmail.com>

  • attachment feedgenerator.2.diff added.

the patch without the atom subtitle

04/08/07 04:09:30 changed by Baptiste <baptiste.goupil@gmail.com>

  • needs_better_patch deleted.

04/08/07 04:16:03 changed by Baptiste <baptiste.goupil@gmail.com>

  • attachment feedgenerator.3.diff added.

And a bonus patch that sets the <subtitle> to the given argument subtitle if it exists or the description if not, since the <subtitle> is almost the description. Nothing is broken, and that allows to use the same code for ATOM & RSS feeds.

04/08/07 05:48:23 changed by mtredinnick

It is misleading to use the description element for the subtitle. The subtitle could be used as a description, but need not be, hence they are not identical. If somebody wants to use their description as subtitle in their Atom feed then they can write subtitle=description in their class.

We provide access to the subtitle element already. Two ways to do the same thing is confusing and not the Python way.

A documentation patch to clear up that subtitle is available in Atom feeds would be fine, if you like.

So, patch 2 is accepted, patch 3 is not.

04/08/07 10:56:29 changed by Baptiste <baptiste.goupil@gmail.com>

Yes, you are right, that is smarter to have a required argument "description" not used, instead of putting its content in the <subtitle> of which main usage is to contain the description of the feed. But maybe it is the "Python way" you are talking about... Anyway, I won't write any doc about that, because I think this behaviour is stupid and especially because I am not talking a fluently English.

04/09/07 07:25:31 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [4981]) Fixed #3958 -- Added lastBuildDate element to RSS feeds. Thanks, baptiste.goupil@gmail.com.


Add/Change #3958 (little changes for conformance to ATOM & RSS specs)




Change Properties
Action