[1.9.x] Fixed #27307 -- Added missing url names in sitemaps docs.

Backport of fe1aee6b98 from master
This commit is contained in:
Tim Graham 2016-10-03 16:04:30 -04:00
parent f0b55f160f
commit 69a2d0c5bf
1 changed files with 3 additions and 2 deletions

View File

@ -366,7 +366,8 @@ Here's what the relevant URLconf lines would look like for the example above::
urlpatterns = [
url(r'^sitemap\.xml$', views.index, {'sitemaps': sitemaps}),
url(r'^sitemap-(?P<section>.+)\.xml$', views.sitemap, {'sitemaps': sitemaps}),
url(r'^sitemap-(?P<section>.+)\.xml$', views.sitemap, {'sitemaps': sitemaps},
name='django.contrib.sitemaps.views.sitemap'),
]
This will automatically generate a :file:`sitemap.xml` file that references
@ -412,7 +413,7 @@ parameter to the ``sitemap`` and ``index`` views via the URLconf::
url(r'^custom-sitemap-(?P<section>.+)\.xml$', views.sitemap, {
'sitemaps': sitemaps,
'template_name': 'custom_sitemap.html'
}),
}, name='django.contrib.sitemaps.views.sitemap'),
]