summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-07-10 12:33:55 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-07-10 12:33:55 +0000
commit86640f33c1f290a64452ce700e6f3da1ba618bdf (patch)
treed4c61b58f064729d74631acabaaa6db25897a30f /docs
parent87d8976faee7b07a30ce1bd844b2b6178c3a3328 (diff)
Fixed #3760 -- Added the ability to manually set feed- and item-level id
elements in Atom feeds. This is fully backwards compatible. Based on a patch from spark343@cs.ubc.ca. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/syndication_feeds.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/syndication_feeds.txt b/docs/syndication_feeds.txt
index 2a03e6d5a6..2af287cf84 100644
--- a/docs/syndication_feeds.txt
+++ b/docs/syndication_feeds.txt
@@ -416,6 +416,24 @@ This example illustrates all possible attributes and methods for a ``Feed`` clas
link = '/foo/bar/' # Hard-coded link.
+ # GUID -- One of the following three is optional. The framework looks
+ # for them in this order. This property is only used for Atom feeds
+ # (where it is the feed-level id element). If not provided, the feed
+ # link is used as the id.
+
+ def feed_guid(self, obj):
+ """
+ Takes the object returned by get_object() and returns the globally
+ unique id for the feed as a normal Python string.
+ """
+
+ def feed_guid(self):
+ """
+ Returns the feed's globally unique id as a normal Python string.
+ """
+
+ feed_guid = '/foo/bar/1234' # Hard-coded guid.
+
# DESCRIPTION -- One of the following three is required. The framework
# looks for them in this order.
@@ -556,6 +574,15 @@ This example illustrates all possible attributes and methods for a ``Feed`` clas
Returns the URL for every item in the feed.
"""
+ # ITEM_GUID -- The following method is optional. This property is
+ # only used for Atom feeds (it is the id element for an item in an
+ # Atom feed). If not provided, the item's link is used by default.
+
+ def item_guid(self, obj):
+ """
+ Takes an item, as return by items(), and returns the item's id.
+ """
+
# ITEM AUTHOR NAME --One of the following three is optional. The
# framework looks for them in this order.