浏览代码

Fixed #32850 -- Doc'd Sitemap.paginator.

Thomas Guettler 3 年之前
父节点
当前提交
775f7506d7
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      docs/ref/contrib/sitemaps.txt

+ 9 - 0
docs/ref/contrib/sitemaps.txt

@@ -186,6 +186,15 @@ Note:
         Django respond appropriately to requests with an ``If-Modified-Since``
         header which will prevent sending the sitemap if it hasn't changed.
 
+    .. attribute:: Sitemap.paginator
+
+        **Optional.**
+
+        This property returns a :class:`~django.core.paginator.Paginator` for
+        :attr:`~Sitemap.items()`. If you generate sitemaps in a batch you may
+        want to override this as a cached property in order to avoid multiple
+        ``items()`` calls.
+
     .. attribute:: Sitemap.changefreq
 
         **Optional.** Either a method or attribute.