Django

Code

Changeset 4982

Show
Ignore:
Timestamp:
04/09/07 07:35:05 (2 years ago)
Author:
mtredinnick
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/syndication_feeds.txt

    r4478 r4982  
    115115      instances. Although you get a few bits of functionality "for free" by 
    116116      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. 
    117121 
    118122One thing's left to do. In an RSS feed, each ``<item>`` has a ``<title>``, 
     
    319323    class AtomSiteNewsFeed(RssSiteNewsFeed): 
    320324        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. 
    321335 
    322336And the accompanying URLconf::