#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 , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(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.