summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-02-10 08:36:39 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-02-10 08:36:39 +0000
commit937f3190baabb5c98398b391bcf8250bbb738da5 (patch)
tree5b7971b36837305a23ebe6c751e9ddff972d899d /docs
parentfefcbbfe3719eaf0b493eabaab591c0b7bc35d9e (diff)
Fixed #2762 -- added copyright element support to RSS and Atom feeds. Patch
from Jonathan Buchanan. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4478 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/syndication_feeds.txt35
1 files changed, 34 insertions, 1 deletions
diff --git a/docs/syndication_feeds.txt b/docs/syndication_feeds.txt
index 72b05ff16a..a64914de3f 100644
--- a/docs/syndication_feeds.txt
+++ b/docs/syndication_feeds.txt
@@ -127,7 +127,7 @@ put into those elements.
it two template context variables:
* ``{{ obj }}`` -- The current object (one of whichever objects you
- returned in ``items()``).
+ returned in ``items()``).
* ``{{ site }}`` -- A ``django.models.core.sites.Site`` object
representing the current site. This is useful for
``{{ site.domain }}`` or ``{{ site.name }}``.
@@ -478,6 +478,22 @@ This example illustrates all possible attributes and methods for a ``Feed`` clas
categories = ("python", "django") # Hard-coded list of categories.
+ # COPYRIGHT NOTICE -- One of the following three is optional. The
+ # framework looks for them in this order.
+
+ def copyright(self, obj):
+ """
+ Takes the object returned by get_object() and returns the feed's
+ copyright notice as a normal Python string.
+ """
+
+ def copyright(self):
+ """
+ Returns the feed's copyright notice as a normal Python string.
+ """
+
+ copyright = 'Copyright (c) 2007, Sally Smith' # Hard-coded copyright notice.
+
# ITEMS -- One of the following three is required. The framework looks
# for them in this order.
@@ -659,6 +675,23 @@ This example illustrates all possible attributes and methods for a ``Feed`` clas
item_categories = ("python", "django") # Hard-coded categories.
+ # ITEM COPYRIGHT NOTICE (only applicable to Atom feeds) -- One of the
+ # following three is optional. The framework looks for them in this
+ # order.
+
+ def item_copyright(self, obj):
+ """
+ Takes an item, as returned by items(), and returns the item's
+ copyright notice as a normal Python string.
+ """
+
+ def item_copyright(self):
+ """
+ Returns the copyright notice for every item in the feed.
+ """
+
+ item_copyright = 'Copyright (c) 2007, Sally Smith' # Hard-coded copyright notice.
+
The low-level framework
=======================