Django

Code

Changeset 1195

Show
Ignore:
Timestamp:
11/11/05 21:48:14 (3 years ago)
Author:
adrian
Message:

Fixed ReST bugs in docs/syndication_feeds.txt

Files:

Legend:

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

    r1194 r1195  
    125125      specified in the URLconf for the given feed. The RSS system renders that 
    126126      template for each item, passing it two template context variables: 
    127         * ``{{ obj }}`` -- The current object (one of whichever objects you 
    128           returned in ``items()``). 
    129         * ``{{ site }}`` -- A ``django.models.core.sites.Site`` object 
    130           representing the current site. This is useful for 
    131           ``{{ site.domain }}`` or ``{{ site.name }}``. 
     127 
     128          * ``{{ obj }}`` -- The current object (one of whichever objects you 
     129            returned in ``items()``). 
     130          * ``{{ site }}`` -- A ``django.models.core.sites.Site`` object 
     131            representing the current site. This is useful for 
     132            ``{{ site.domain }}`` or ``{{ site.name }}``. 
     133 
    132134      If you don't create a template for either the title or description, the 
    133135      framework will use the template ``{{ obj }}`` by default -- that is, the 
     
    211213      each of ``title``, ``link`` and ``description``, Django follows this 
    212214      algorithm: 
    213         * First, it tries to call a method, passing the ``obj`` argument, where 
    214           ``obj`` is the object returned by ``get_object()``. 
    215         * Failing that, it tries to call a method with no arguments. 
    216         * Failing that, it uses the class attribute. 
     215 
     216          * First, it tries to call a method, passing the ``obj`` argument, where 
     217            ``obj`` is the object returned by ``get_object()``. 
     218          * Failing that, it tries to call a method with no arguments. 
     219          * Failing that, it uses the class attribute. 
     220 
    217221    * Finally, note that ``items()`` in this example also takes the ``obj`` 
    218222      argument. The algorithm for ``items`` is the same as described in the 
     
    305309 
    306310Feed class reference 
    307 ------------------- 
     311-------------------- 
    308312 
    309313This example illustrates all possible attributes and methods for a ``Feed`` class:: 
     
    497501 
    498502``__init__(title, link, description, language=None, author_email=None, 
    499     author_name=None, author_link=None, subtitle=None, categories=None)`` 
     503author_name=None, author_link=None, subtitle=None, categories=None)`` 
    500504 
    501505Initializes the feed with the given metadata, which applies to the entire feed 
     
    506510 
    507511``add_item(title, link, description, author_email=None, author_name=None, 
    508     pubdate=None, comments=None, unique_id=None, enclosure=None, categories=())`` 
     512pubdate=None, comments=None, unique_id=None, enclosure=None, categories=())`` 
    509513 
    510514Add an item to the feed with the given parameters. All parameters, if given,