diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-04-09 12:35:05 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-04-09 12:35:05 +0000 |
| commit | 37201540276bc0cd25310d4bd3aec83c91effa91 (patch) | |
| tree | a2b225c400d883fc40908a52b6a30eaf6e0a6cb9 /docs | |
| parent | db8ca449817491f9f11cecee864e910aeb19c7d5 (diff) | |
Clarified that there is no feed-level description element in Atom feeds and the
subtitle element (and model attribute) may be a substitute in many cases.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4982 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/syndication_feeds.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/syndication_feeds.txt b/docs/syndication_feeds.txt index a64914de3f..0b402d0195 100644 --- a/docs/syndication_feeds.txt +++ b/docs/syndication_feeds.txt @@ -114,6 +114,10 @@ Note: `object-relational mapper`_, ``items()`` doesn't have to return model instances. Although you get a few bits of functionality "for free" by using Django models, ``items()`` can return any type of object you want. + * If you are creating an Atom feed, rather than the default RSS feed, you + will want to set the ``subtitle`` attribute instead of the + ``description`` attribute. See `Publishing Atom and RSS feeds in + tandem`_, later, for an example. One thing's left to do. In an RSS feed, each ``<item>`` has a ``<title>``, ``<link>`` and ``<description>``. We need to tell the framework what data to @@ -318,6 +322,16 @@ Here's a full example:: class AtomSiteNewsFeed(RssSiteNewsFeed): feed_type = Atom1Feed + subtitle = description + +.. Note:: + In Atom feeds, there is no feed-level description element. There *is* a + subtitle element, however. Your RSS feed description may be too verbose + for a subtitle, so Django does not automatically put the feed description + into the subtitle element. Instead, you should create a ``subtitle`` + attribute in your model, containing an appropriate string. In the above + example, we have used the RSS feed's description, since it is quite short + already. And the accompanying URLconf:: |
