Opened 4 years ago

Closed 3 years ago

#16150 closed Bug (fixed)

Syndication Feed docs incorrectly describe <link> tag.

Reported by: melinath Owned by: melinath
Component: Documentation Version: master
Severity: Normal Keywords: rss
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The current docs use the language "feed's link" when referring to the dynamic "link" attribute, which is later used to generate the <link> element of the rss channel. However, according to the RSS spec, <link> is "The URL to the HTML website corresponding to the channel."

In Atom, the <link> element refers either to the corresponding HTML website or to the feed itself, depending on whether the rel attribute is set to "alternate" or "self" respectively. Django is consistent and uses the dynamic "link" attribute for alternate, reserving "feed_url" for the self reference.

So the docs are currently inaccurate. "link" is not used as the feed's url - it's used as the url of the website corresponding to the feed. The simplest way to fix it would be to change the language for the link dynamic attr docs. However, it would probably be good to add feed_url to the list of dynamic attrs, since the syndication code already looks for it.

Attachments (2)

syndication_docs.diff (1.2 KB) - added by melinath 4 years ago.
16150_v2.diff (1.4 KB) - added by krzysiumed 3 years ago.

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by melinath

comment:1 Changed 4 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by melinath

  • Status changed from new to assigned
  • UI/UX unset

comment:3 Changed 4 years ago by aaugustin

  • Patch needs improvement set

In the FEED_URL section, shouldn't link = '/foo/bar/' read feed_url = '/foo/bar/' instead?

Also, I suggest using significant URLs to convey the difference: for instance, link = '/blog/' and feed_url = '/blog/rss/.

Changed 3 years ago by krzysiumed

comment:4 Changed 3 years ago by krzysiumed

  • Patch needs improvement unset

I improved the melinath patch by appling aaugustin advices.

comment:5 Changed 3 years ago by jezdez

  • Triage Stage changed from Accepted to Ready for checkin

comment:6 Changed 3 years ago by aaugustin

  • Resolution set to fixed
  • Status changed from assigned to closed

In [17516]:

Fixed #16150 -- Added 'feed_url' and clarified 'link' in the Feed reference docs.

Note: See TracTickets for help on using tickets.
Back to Top