﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30817	Document that Sitemap.items() can return an iterable.	Chris Jerdonek	Christoffer Sjöbergsson	"Currently, the Django docs don't say that `Sitemap.items()` can return a `QuerySet`. It just says it can return a list:

> Sitemap.items: Required. A method that returns a list of objects.

(From: https://github.com/django/django/blob/fa8fe09e4e2b538c5d50a559081861d5c0635d55/docs/ref/contrib/sitemaps.txt#L136-L142 )

> :attr:`~Sitemap.items()` is a method that returns a list of objects.

(From: https://github.com/django/django/blob/fa8fe09e4e2b538c5d50a559081861d5c0635d55/docs/ref/contrib/sitemaps.txt#L119 )

We know it can be a `QuerySet` because e.g. the items are passed to a `Paginator`:

https://github.com/django/django/blob/fa8fe09e4e2b538c5d50a559081861d5c0635d55/django/contrib/sitemaps/__init__.py#L80

and `Paginator` objects accept `QuerySet` objects: https://docs.djangoproject.com/en/2.2/topics/pagination/#example

Knowing that it can return a `QuerySet` is useful if you want to paginate your sitemap without having to temporarily query and store in memory all objects in one (possibly giant) list."	Cleanup/optimization	closed	Documentation	dev	Normal	fixed	sitemap		Accepted	1	0	0	0	1	0
