Ticket #9515: syndication-docs.diff

File syndication-docs.diff, 1.8 KB (added by Adi J. Sieker, 16 years ago)

docs patch item_link, get_absolute_url order

  • docs/ref/contrib/syndication.txt

     
    167167      :class:`~django.contrib.syndication.feeds.Feed` class.
    168168
    169169    * To specify the contents of ``<link>``, you have two options. For each item
    170       in :meth:`items()`, Django first tries executing a ``get_absolute_url()``
    171       method on that object. If that method doesn't exist, it tries calling a
    172       method :meth:`item_link()` in the
    173       :class:`~django.contrib.syndication.feeds.Feed` class, passing it a single
    174       parameter, :attr:`item`, which is the object itself. Both
    175       ``get_absolute_url()`` and :meth:`item_link()` should return the item's
    176       URL as a normal Python string. As with ``get_absolute_url()``, the result
    177       of :meth:`item_link()` will be included directly in the URL, so you are
    178       responsible for doing all necessary URL quoting and conversion to ASCII
    179       inside the method itself.
     170      in :meth:`items()`, Django first tries calling a method :meth:`item_link()`
     171      in the :class:`~django.contrib.syndication.feeds.Feed` class, passing it a
     172      single parameter, :attr:`item`, which is the object itself. If that method
     173      doesn't exist, it tries executing a ``get_absolute_url()`` method on that
     174      object. Both ``get_absolute_url()`` and :meth:`item_link()` should return
     175      the item's URL as a normal Python string. As with ``get_absolute_url()``,
     176      the result of :meth:`item_link()` will be included directly in the URL,
     177      so you are responsible for doing all necessary URL quoting and conversion
     178      to ASCII inside the method itself.
    180179
    181180    * For the LatestEntries example above, we could have very simple feed
    182181      templates:
Back to Top