Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#11973 closed (fixed)

Syndication framework documentation refers to "copyright" attribute rather than "feed_copyright"

Reported by: peppergrower Owned by: nobody
Component: contrib.syndication Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Django's syndication framework documentation (http://docs.djangoproject.com/en/dev/ref/contrib/syndication/) says that in order to include a copyright notice in your feed (at the feed level), you can either define copyright() or hard-code a copyright variable. However, I did so and then checked the resulting XML output of my Atom feed, and the copyright information wasn't included anywhere.

After looking at django/utils/feedgenerator.py, I realized that it was looking for feed_copyright() (or a feed_copyright variable), not copyright(). After changing my Feed class to define feed_copyright(), it showed up in the feed as expected.

There are two ways to resolve this: change the documentation, or change the code. Changing the documentation is the easiest approach. On the other hand, changing the code would make this method slightly more consistent with the other methods/attributes defined (most of which have a bare name, e.g., title(), and then are prefixed with item_ for the corresponding item-level method, e.g., item_title().) It would, however, break backward compatibility.

I suggest replacing references in the documentation to "copyright" with "feed_copyright".

Change History (2)

comment:1 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: newclosed

(In [12338]) Fixed #6188, #6304, #6618, #6969, #8758, #8989, #10334, #11069, #11973 and #12403 -- Modified the syndication framework to use class-based views. Thanks to Ben Firshman for his work on this patch.

comment:2 by Russell Keith-Magee, 15 years ago

(In [12339]) [1.1.X] Fixed #11973 -- Corrected some misleading documentation regarding the feed_copyright attribute on feeds.

Backport of a small part of r12338 from trunk.

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