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

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is a customised template -->
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% spaceless %}
{% for site in sitemaps %}
<sitemap>
<loc>{{ site.location }}</loc>
{% if site.last_mod %}
<lastmod>{{ site.last_mod|date:"c" }}</lastmod>
{% endif %}
</sitemap>
{% endfor %}
{% endspaceless %}
</sitemapindex>