summaryrefslogtreecommitdiff
path: root/docs/syndication_feeds.txt
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-11-14 04:59:20 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-11-14 04:59:20 +0000
commit7626cb058107ac1ecb0795162e4c9fc4f92356dd (patch)
treead0274d4cd36b067ca80f2d4eea698a8efdc2290 /docs/syndication_feeds.txt
parent7b315b47aa09611ff293fd6cfaf21b86f7045a2b (diff)
downloaddjango-7626cb058107ac1ecb0795162e4c9fc4f92356dd.tar.gz
Improved Atom feed-generating framework to output <link rel='self'>. Added a feed_url hook to feedgenerator for this purpose, and changed the syndication Feed and views to use it. Also updated docs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/syndication_feeds.txt')
-rw-r--r--docs/syndication_feeds.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/docs/syndication_feeds.txt b/docs/syndication_feeds.txt
index 4298bc81b6..453fe71e9d 100644
--- a/docs/syndication_feeds.txt
+++ b/docs/syndication_feeds.txt
@@ -266,6 +266,21 @@ comes directly from your `LANGUAGE_CODE setting`_.
.. _LANGUAGE_CODE setting: http://www.djangoproject.com/documentation/settings/#language-code
+URLs
+----
+
+The ``link`` method/attribute can return either an absolute URL (e.g.
+``"/blog/"``) or a URL with the fully-qualified domain and protocol (e.g.
+``"http://www.example.com/blog/"``). If ``link`` doesn't return the domain,
+the syndication framework will insert the domain of the current site, according
+to your `SITE_ID setting`_.
+
+Atom feeds require a ``<link rel="self">`` that defines the feed's current
+location. The syndication framework populates this automatically, using the
+domain of the current site according to the SITE_ID setting.
+
+.. _SITE_ID setting: http://www.djangoproject.com/documentation/settings/#site-id
+
Publishing Atom and RSS feeds in tandem
---------------------------------------
@@ -501,7 +516,8 @@ Each of these three classes knows how to render a certain type of feed as XML.
They share this interface:
``__init__(title, link, description, language=None, author_email=None,``
-``author_name=None, author_link=None, subtitle=None, categories=None)``
+``author_name=None, author_link=None, subtitle=None, categories=None,``
+``feed_url=None)``
Initializes the feed with the given metadata, which applies to the entire feed
(i.e., not just to a specific item in the feed).