diff options
| author | Sjbrgsn <chsnot@gmail.com> | 2019-09-30 14:52:17 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-10-02 12:16:48 +0200 |
| commit | 516200c09eb5664a529eced4991a599f7e7bb3c8 (patch) | |
| tree | ed33118016e6abd6a59f57af8ef65f7f0eb91dc8 | |
| parent | 2624653bef5eca2b87bbbcf81c888a21874ae65f (diff) | |
[3.0.x] Fixed #30817 -- Clarified return value of Sitemap.items().
Backport of 7b3c06cd72e691ffd932ccce338701c37297a415 from master
| -rw-r--r-- | docs/ref/contrib/sitemaps.txt | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt index 0dc4d48bd5..c3cba8856d 100644 --- a/docs/ref/contrib/sitemaps.txt +++ b/docs/ref/contrib/sitemaps.txt @@ -116,10 +116,11 @@ Note: attributes corresponding to ``<changefreq>`` and ``<priority>`` elements, respectively. They can be made callable as functions, as :attr:`~Sitemap.lastmod` was in the example. -* :attr:`~Sitemap.items()` is 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 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, @@ -135,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 |
