From da31472abfdc6364fcd00d6c902db8bdc04965c8 Mon Sep 17 00:00:00 2001 From: Sjbrgsn Date: Mon, 30 Sep 2019 14:52:17 +0200 Subject: [PATCH] [2.2.x] Fixed #30817 -- Clarified return value of Sitemap.items(). Backport of 7b3c06cd72e691ffd932ccce338701c37297a415 from master --- docs/ref/contrib/sitemaps.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt index 166013659d..42c07e8831 100644 --- a/docs/ref/contrib/sitemaps.txt +++ b/docs/ref/contrib/sitemaps.txt @@ -116,11 +116,11 @@ Note: attributes corresponding to ```` and ```` elements, respectively. They can be made callable as functions, as :attr:`~Sitemap.lastmod` was in the example. -* :attr:`~Sitemap.items()` is simply a method that returns a list of - objects. The objects returned will get passed to any callable methods - corresponding to a sitemap property (:attr:`~Sitemap.location`, - :attr:`~Sitemap.lastmod`, :attr:`~Sitemap.changefreq`, and - :attr:`~Sitemap.priority`). +* :attr:`~Sitemap.items()` is simply a method that returns a :term:`sequence` + or ``QuerySet`` of objects. The objects returned will get passed to any + callable methods corresponding to a sitemap property + (:attr:`~Sitemap.location`, :attr:`~Sitemap.lastmod`, + :attr:`~Sitemap.changefreq`, and :attr:`~Sitemap.priority`). * :attr:`~Sitemap.lastmod` should return a :class:`~datetime.datetime`. * There is no :attr:`~Sitemap.location` method in this example, but you can provide it in order to specify the URL for your object. By default, @@ -136,11 +136,11 @@ Note: .. attribute:: Sitemap.items - **Required.** A method that returns a list of objects. The framework - doesn't care what *type* of objects they are; all that matters is that - these objects get passed to the :attr:`~Sitemap.location()`, - :attr:`~Sitemap.lastmod()`, :attr:`~Sitemap.changefreq()` and - :attr:`~Sitemap.priority()` methods. + **Required.** A method that returns a :term:`sequence` or ``QuerySet`` + of objects. The framework doesn't care what *type* of objects they are; + all that matters is that these objects get passed to the + :attr:`~Sitemap.location()`, :attr:`~Sitemap.lastmod()`, + :attr:`~Sitemap.changefreq()` and :attr:`~Sitemap.priority()` methods. .. attribute:: Sitemap.location