Skip to content

Commit

Permalink
[1.9.x] Fixed #27307 -- Added missing url names in sitemaps docs.
Browse files Browse the repository at this point in the history
Backport of fe1aee6 from master
  • Loading branch information
timgraham committed Oct 3, 2016
1 parent f0b55f1 commit 69a2d0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/ref/contrib/sitemaps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'),
]


Expand Down

0 comments on commit 69a2d0c

Please sign in to comment.