diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/sitemaps.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt index 4467ed3a6e..7b53fc8c12 100644 --- a/docs/ref/contrib/sitemaps.txt +++ b/docs/ref/contrib/sitemaps.txt @@ -178,6 +178,15 @@ Sitemap class reference representing the last-modified date/time for *every* object returned by :attr:`~Sitemap.items()`. + .. versionadded:: 1.7 + + If all items in a sitemap have a :attr:`~Sitemap.lastmod`, the sitemap + generated by :func:`views.sitemap` will have a ``Last-Modified`` + header equal to the latest ``lastmod``. You can activate the + :class:`~django.middleware.http.ConditionalGetMiddleware` to make + Django respond appropriately to requests with an ``If-Modified-Since`` + header which will prevent sending the sitemap if it hasn't changed. + .. attribute:: Sitemap.changefreq **Optional.** Either a method or attribute. |
