diff options
| author | Julian Bez <julian.bez@uhura.de> | 2013-07-23 16:25:21 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-07-31 07:42:30 -0400 |
| commit | 8f5533ab250df07ea84f98d39808806e282468a5 (patch) | |
| tree | ea9c02f76acd0129d28b2688ec33463beda446a4 /docs | |
| parent | 4d8ecbdfda4da95685a2a51906425c6baa58a09f (diff) | |
Fixed #20793 -- Added Last-Modified header to sitemaps.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/sitemaps.txt | 9 | ||||
| -rw-r--r-- | docs/releases/1.7.txt | 6 |
2 files changed, 15 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. diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index f0efe4f559..0951cd3058 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -95,6 +95,12 @@ Minor features * The :djadminopt:`--no-color` option for ``django-admin.py`` allows you to disable the colorization of management command output. +* The :mod:`sitemap framework<django.contrib.sitemaps>` now makes use of + :attr:`~django.contrib.sitemaps.Sitemap.lastmod` to set a ``Last-Modified`` + header in the response. This makes it possible for the + :class:`~django.middleware.http.ConditionalGetMiddleware` to handle + conditional ``GET`` requests for sitemaps which set ``lastmod``. + Backwards incompatible changes in 1.7 ===================================== |
