Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Clarified that there is no feed-level description element in Atom fee…

…ds 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
  • Loading branch information...
commit 37201540276bc0cd25310d4bd3aec83c91effa91 1 parent db8ca44
Malcolm Tredinnick authored April 09, 2007

Showing 1 changed file with 14 additions and 0 deletions. Show diff stats Hide diff stats

  1. 14  docs/syndication_feeds.txt
14  docs/syndication_feeds.txt
@@ -114,6 +114,10 @@ Note:
114 114
       `object-relational mapper`_, ``items()`` doesn't have to return model
115 115
       instances. Although you get a few bits of functionality "for free" by
116 116
       using Django models, ``items()`` can return any type of object you want.
  117
+    * If you are creating an Atom feed, rather than the default RSS feed, you
  118
+      will want to set the ``subtitle`` attribute instead of the
  119
+      ``description`` attribute. See `Publishing Atom and RSS feeds in
  120
+      tandem`_, later, for an example.
117 121
 
118 122
 One thing's left to do. In an RSS feed, each ``<item>`` has a ``<title>``,
119 123
 ``<link>`` and ``<description>``. We need to tell the framework what data to
@@ -318,6 +322,16 @@ Here's a full example::
318 322
 
319 323
     class AtomSiteNewsFeed(RssSiteNewsFeed):
320 324
         feed_type = Atom1Feed
  325
+        subtitle = description
  326
+
  327
+.. Note::
  328
+    In Atom feeds, there is no feed-level description element. There *is* a
  329
+    subtitle element, however. Your RSS feed description may be too verbose
  330
+    for a subtitle, so Django does not automatically put the feed description
  331
+    into the subtitle element. Instead, you should create a ``subtitle``
  332
+    attribute in your model, containing an appropriate string. In the above
  333
+    example, we have used the RSS feed's description, since it is quite short
  334
+    already.
321 335
 
322 336
 And the accompanying URLconf::
323 337
 

0 notes on commit 3720154

Please sign in to comment.
Something went wrong with that request. Please try again.