Fixed #16150 -- Added 'feed_url' and clarified 'link' in the Feed reference docs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
03c80067c6
commit
d1f8555500
|
@ -388,16 +388,33 @@ This example illustrates all possible attributes and methods for a
|
||||||
|
|
||||||
def link(self, obj):
|
def link(self, obj):
|
||||||
"""
|
"""
|
||||||
# Takes the object returned by get_object() and returns the feed's
|
# Takes the object returned by get_object() and returns the URL
|
||||||
# link as a normal Python string.
|
# of the HTML version of the feed as a normal Python string.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def link(self):
|
def link(self):
|
||||||
"""
|
"""
|
||||||
Returns the feed's link as a normal Python string.
|
Returns the URL of the HTML version of the feed as a normal Python
|
||||||
|
string.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
link = '/foo/bar/' # Hard-coded link.
|
link = '/blog/' # Hard-coded URL.
|
||||||
|
|
||||||
|
# FEED_URL -- One of the following three is optional. The framework
|
||||||
|
# looks for them in this order.
|
||||||
|
|
||||||
|
def feed_url(self, obj):
|
||||||
|
"""
|
||||||
|
# Takes the object returned by get_object() and returns the feed's
|
||||||
|
# own URL as a normal Python string.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def feed_url(self):
|
||||||
|
"""
|
||||||
|
Returns the feed's own URL as a normal Python string.
|
||||||
|
"""
|
||||||
|
|
||||||
|
feed_url = '/blog/rss/' # Hard-coded URL.
|
||||||
|
|
||||||
# GUID -- One of the following three is optional. The framework looks
|
# GUID -- One of the following three is optional. The framework looks
|
||||||
# for them in this order. This property is only used for Atom feeds
|
# for them in this order. This property is only used for Atom feeds
|
||||||
|
|
Loading…
Reference in New Issue