summaryrefslogtreecommitdiff
path: root/docs/ref/utils.txt
diff options
context:
space:
mode:
authorUnai Zalakain <unai@gisa-elkartea.org>2015-08-21 11:50:43 +0200
committerTim Graham <timograham@gmail.com>2015-09-18 18:31:58 -0400
commitaac2a2d2ae2486342058db0c72ed7ba2c7c8eb1e (patch)
tree9d36cf0b889eceb832aee1ffbeea0a826a557b22 /docs/ref/utils.txt
parent71ebcb85b931f43865df5b322b2cf06d3da23f69 (diff)
Fixed #13110 -- Added support for multiple enclosures in Atom feeds.
The ``item_enclosures`` hook returns a list of ``Enclosure`` objects which is then used by the feed builder. If the feed is a RSS feed, an exception is raised as RSS feeds don't allow multiple enclosures per feed item. The ``item_enclosures`` hook defaults to an empty list or, if the ``item_enclosure_url`` hook is defined, to a list with a single ``Enclosure`` built from the ``item_enclosure_url``, ``item_enclosure_length``, and ``item_enclosure_mime_type`` hooks.
Diffstat (limited to 'docs/ref/utils.txt')
-rw-r--r--docs/ref/utils.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index c416c82db1..c1df458872 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -351,11 +351,18 @@ SyndicationFeed
All parameters should be Unicode objects, except ``categories``, which
should be a sequence of Unicode objects.
- .. method:: add_item(title, link, description, author_email=None, author_name=None, author_link=None, pubdate=None, comments=None, unique_id=None, enclosure=None, categories=(), item_copyright=None, ttl=None, updateddate=None, **kwargs)
+ .. method:: add_item(title, link, description, author_email=None, author_name=None, author_link=None, pubdate=None, comments=None, unique_id=None, enclosure=None, categories=(), item_copyright=None, ttl=None, updateddate=None, enclosures=None, **kwargs)
Adds an item to the feed. All args are expected to be Python ``unicode``
objects except ``pubdate`` and ``updateddate``, which are ``datetime.datetime``
- objects, and ``enclosure``, which is an instance of the ``Enclosure`` class.
+ objects, ``enclosure``, which is an ``Enclosure`` instance, and
+ ``enclosures``, which is a list of ``Enclosure`` instances.
+
+ .. deprecated:: 1.9
+
+ The ``enclosure`` keyword argument is deprecated in favor of the
+ new ``enclosures`` keyword argument which accepts a list of
+ ``Enclosure`` objects.
.. method:: num_items()