Author: russellm
Date: 2009-02-22 00:41:41 -0600 (Sun, 22 Feb 2009)
New Revision: 9868

Modified:
   django/branches/releases/1.0.X/
   django/branches/releases/1.0.X/docs/ref/contrib/syndication.txt
Log:
[1.0.X] Fixed #10141 -- Added a missing import to the complex Feed example. 
Thanks to Temoto for the report.

Merge of r9858 from trunk.



Property changes on: django/branches/releases/1.0.X
___________________________________________________________________
Name: svnmerge-integrated
   - 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9810,9812,9821,9847,9856-9857
   + 
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9526,9529,9533-9536,9539-9550,9556-9557,9559-9560,9562-9568,9570-9591,9595-9619,9621-9624,9626-9636,9638-9642,9644-9645,9647-9689,9691-9699,9703-9706,9709-9713,9716-9723,9725-9726,9730-9738,9740-9741,9750-9751,9757-9758,9761-9762,9767-9768,9770-9780,9782-9784,9789-9790,9793-9798,9801-9802,9806-9807,9809-9810,9812,9821,9847,9856-9858

Modified: django/branches/releases/1.0.X/docs/ref/contrib/syndication.txt
===================================================================
--- django/branches/releases/1.0.X/docs/ref/contrib/syndication.txt     
2009-02-22 06:39:55 UTC (rev 9867)
+++ django/branches/releases/1.0.X/docs/ref/contrib/syndication.txt     
2009-02-22 06:41:41 UTC (rev 9868)
@@ -143,7 +143,7 @@
 
          * ``{{ obj }}`` -- The current object (one of whichever objects you
            returned in :meth:`items()`).
-         
+
          * ``{{ site }}`` -- A :class:`django.contrib.sites.models.Site` object
            representing the current site. This is useful for ``{{ site.domain
            }}`` or ``{{ site.name }}``. If you do *not* have the Django sites
@@ -181,9 +181,9 @@
             {{ obj.title }}
 
       * latest_description.html:
-      
+
         .. code-block:: html+django
-      
+
             {{ obj.description }}
 
 .. _chicagocrime.org: http://www.chicagocrime.org/
@@ -213,6 +213,7 @@
 An example makes this clear. Here's the code for these beat-specific feeds::
 
     from django.contrib.syndication.feeds import FeedDoesNotExist
+    from django.core.exceptions import ObjectDoesNotExist
 
     class BeatFeed(Feed):
         def get_object(self, bits):
@@ -278,9 +279,9 @@
 
         * First, it tries to call a method, passing the ``obj`` argument, where
           ``obj`` is the object returned by :meth:`get_object()`.
-        
+
         * Failing that, it tries to call a method with no arguments.
-        
+
         * Failing that, it uses the class attribute.
 
       Inside the :meth:`link()` method, we handle the possibility that ``obj``
@@ -840,11 +841,11 @@
 
     Initialize the feed with the given dictionary of metadata, which applies to
     the entire feed. Required keyword arguments are:
-    
+
         * ``title``
         * ``link``
         * ``description``
-    
+
     There's also a bunch of other optional keywords:
 
         * ``language``
@@ -857,7 +858,7 @@
         * ``feed_copyright``
         * ``feed_guid``
         * ``ttl``
-    
+
     Any extra keyword arguments you pass to ``__init__`` will be stored in
     ``self.feed`` for use with `custom feed generators`_.
 
@@ -866,7 +867,7 @@
 
 .. method:: SyndicationFeed.add_item(**kwargs)
 
-    Add an item to the feed with the given parameters. 
+    Add an item to the feed with the given parameters.
 
     Required keyword arguments are:
 
@@ -893,7 +894,7 @@
 
         * ``pubdate`` should be a `Python datetime object`_.
         * ``enclosure`` should be an instance of ``feedgenerator.Enclosure``.
-        * ``categories`` should be a sequence of Unicode objects.    
+        * ``categories`` should be a sequence of Unicode objects.
 
 .. method:: SyndicationFeed.write(outfile, encoding)
 
@@ -927,7 +928,7 @@
 ----------------------
 
 If you need to produce a custom feed format, you've got a couple of options.
-    
+
 If the feed format is totally custom, you'll want to subclass
 ``SyndicationFeed`` and completely replace the ``write()`` and
 ``writeString()`` methods.
@@ -938,25 +939,25 @@
 and there are a set of methods that ``SyndicationFeed`` calls to get these 
extra
 attributes. Thus, you can subclass the appropriate feed generator class
 (``Atom1Feed`` or ``Rss201rev2Feed``) and extend these callbacks. They are:
-      
+
 .. _georss: http://georss.org/
 .. _itunes podcast format: 
http://www.apple.com/itunes/store/podcaststechspecs.html
 
 ``SyndicationFeed.root_attributes(self, )``
     Return a ``dict`` of attributes to add to the root feed element
     (``feed``/``channel``).
-    
+
 ``SyndicationFeed.add_root_elements(self, handler)``
     Callback to add elements inside the root feed element
     (``feed``/``channel``). ``handler`` is an `XMLGenerator`_ from Python's
     built-in SAX library; you'll call methods on it to add to the XML
     document in process.
-    
+
 ``SyndicationFeed.item_attributes(self, item)``
     Return a ``dict`` of attributes to add to each item (``item``/``entry``)
     element. The argument, ``item``, is a dictionary of all the data passed to
     ``SyndicationFeed.add_item()``.
-    
+
 ``SyndicationFeed.add_item_elements(self, handler, item)``
     Callback to add elements to each item (``item``/``entry``) element.
     ``handler`` and ``item`` are as above.
@@ -973,7 +974,7 @@
             attrs = super(iTunesFeed, self).root_attributes()
             attrs['xmlns:itunes'] = 
'http://www.itunes.com/dtds/podcast-1.0.dtd'
             return attrs
-            
+
         def add_root_elements(self, handler):
             super(iTunesFeed, self).add_root_elements(handler)
             handler.addQuickElement('itunes:explicit', 'clean')


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to