diff --git a/docs/syndication_feeds.txt b/docs/syndication_feeds.txt index f518554b604..4298bc81b66 100644 --- a/docs/syndication_feeds.txt +++ b/docs/syndication_feeds.txt @@ -89,7 +89,7 @@ can live anywhere in your codebase. A simple example ---------------- -This simple example, taken from chicagocrime.org, describes a feed of the +This simple example, taken from `chicagocrime.org`_, describes a feed of the latest five news items:: from django.contrib.syndication.feeds import Feed @@ -132,8 +132,8 @@ put into those elements. ``{{ site.domain }}`` or ``{{ site.name }}``. If you don't create a template for either the title or description, the - framework will use the template ``{{ obj }}`` by default -- that is, the - normal string representation of the object. + framework will use the template ``"{{ obj }}"`` by default -- that is, + the normal string representation of the object. * To specify the contents of ````, you have two options. For each item in ``items()``, Django first tries executing a ``get_absolute_url()`` method on that object. If that method doesn't @@ -142,6 +142,7 @@ put into those elements. Both ``get_absolute_url()`` and ``item_link()`` should return the item's URL as a normal Python string. +.. _chicagocrime.org: http://www.chicagocrime.org/ .. _object-relational mapper: http://www.djangoproject.com/documentation/db_api/ .. _Django templates: http://www.djangoproject.com/documentation/templates/ @@ -150,18 +151,18 @@ A complex example The framework also supports more complex feeds, via parameters. -For example, chicagocrime.org offers an RSS feed of recent crimes for every +For example, `chicagocrime.org`_ offers an RSS feed of recent crimes for every police beat in Chicago. It'd be silly to create a separate ``Feed`` class for each police beat; that would violate the `DRY principle`_ and would couple data -to programming logic. Instead, the RSS framework lets you make generic feeds -that output items based on information in the feed's URL. +to programming logic. Instead, the syndication framework lets you make generic +feeds that output items based on information in the feed's URL. On chicagocrime.org, the police-beat feeds are accessible via URLs like this: * ``/rss/beats/0613/`` -- Returns recent crimes for beat 0613. * ``/rss/beats/1424/`` -- Returns recent crimes for beat 1424. -The slug here is ``beats``. The syndication framework sees the extra URL bits +The slug here is ``"beats"``. The syndication framework sees the extra URL bits after the slug -- ``0613`` and ``1424`` -- and gives you a hook to tell it what those URL bits mean, and how they should influence which items get published in the feed. @@ -207,8 +208,8 @@ request to the URL ``/rss/beats/0613/``: subclass of ``ObjectDoesNotExist``. Raising ``ObjectDoesNotExist`` in ``get_object()`` tells Django to produce a 404 error for that request. * To generate the feed's ``