Changeset 4031
- Timestamp:
- 11/06/06 19:54:34 (2 years ago)
- Files:
-
- django/trunk/docs/syndication_feeds.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/syndication_feeds.txt
r3721 r4031 96 96 from chicagocrime.models import NewsItem 97 97 98 class SiteNewsFeed(Feed):98 class LatestEntries(Feed): 99 99 title = "Chicagocrime.org site news" 100 100 link = "/sitenews/" … … 121 121 122 122 * To specify the contents of ``<title>`` and ``<description>``, create 123 `Django templates`_ called ``feeds/ sitenews_title.html`` and124 ``feeds/ sitenews_description.html``, where ``sitenews`` is the ``slug``123 `Django templates`_ called ``feeds/latest_title.html`` and 124 ``feeds/latest_description.html``, where ``latest`` is the ``slug`` 125 125 specified in the URLconf for the given feed. Note the ``.html`` extension 126 126 is required. The RSS system renders that template for each item, passing … … 128 128 129 129 * ``{{ obj }}`` -- The current object (one of whichever objects you 130 returned in ``items()``). 130 returned in ``items()``). 131 131 * ``{{ site }}`` -- A ``django.models.core.sites.Site`` object 132 132 representing the current site. This is useful for … … 145 145 Both ``get_absolute_url()`` and ``item_link()`` should return the item's 146 146 URL as a normal Python string. 147 148 * For the LatestEntries example above, we could have very simple feed templates: 149 150 * latest_title.html:: 151 152 {{ obj.title }} 153 154 * latest_description.html:: 155 156 {{ obj.description }} 147 157 148 158 .. _chicagocrime.org: http://www.chicagocrime.org/
