1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #25916 -- Added lastmod support to sitemap index view.

Co-authored-by: Matthew Downey <matthew.downey@webit.com.au>
This commit is contained in:
David Smith
2020-12-30 16:44:53 +00:00
committed by Carlton Gibson
parent 2ce03a2bac
commit 480191244d
11 changed files with 295 additions and 45 deletions

View File

@@ -88,7 +88,11 @@ Minor features
:mod:`django.contrib.sitemaps`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* ...
* The default sitemap index template ``<sitemapindex>`` now includes the
``<lastmod>`` timestamp where available, through the new
:meth:`~django.contrib.sitemaps.Sitemap.get_latest_lastmod` method. Custom
sitemap index templates should be updated for the adjusted :ref:`context
variables <sitemap-index-context-variables>`.
:mod:`django.contrib.sites`
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -253,7 +257,10 @@ Features deprecated in 4.1
Miscellaneous
-------------
* ...
* The context for sitemap index templates of a flat list of URLs is deprecated.
Custom sitemap index templates should be updated for the adjusted
:ref:`context variables <sitemap-index-context-variables>`, expecting a list
of objects with ``location`` and optional ``lastmod`` attributes.
Features removed in 4.1
=======================