Changeset 6873
- Timestamp:
- 12/03/07 23:58:43 (9 months ago)
- Files:
-
- django/trunk/docs/syndication_feeds.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/syndication_feeds.txt
r6806 r6873 235 235 ``['0613']``. For a request to ``/rss/beats/0613/foo/bar/``, bits would 236 236 be ``['0613', 'foo', 'bar']``. 237 237 238 * ``get_object()`` is responsible for retrieving the given beat, from the 238 239 given ``bits``. In this case, it uses the Django database API to retrieve … … 244 245 subclass of ``ObjectDoesNotExist``. Raising ``ObjectDoesNotExist`` in 245 246 ``get_object()`` tells Django to produce a 404 error for that request. 247 246 248 * To generate the feed's ``<title>``, ``<link>`` and ``<description>``, 247 249 Django uses the ``title()``, ``link()`` and ``description()`` methods. In … … 259 261 might be ``None``, which can occur when the URL isn't fully specified. In 260 262 some cases, you might want to do something else in this case, which would 261 mean you'd need to check for ``obj`` existing in other methods as well 262 ( the ``link()`` method is called very early in the feed generation263 process, so i s a good place to bail out early).263 mean you'd need to check for ``obj`` existing in other methods as well. 264 (The ``link()`` method is called very early in the feed generation 265 process, so it's a good place to bail out early.) 264 266 265 267 * Finally, note that ``items()`` in this example also takes the ``obj``
