﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27307	sitemap url examples missing names	Oleksandr Shtalinberg	Tim Graham	"I did as documentation example
https://docs.djangoproject.com/en/1.10/ref/contrib/sitemaps/#creating-a-sitemap-index


{{{
from django.contrib.sitemaps import views as sm_views

class PagesSitemap(Sitemap):
    changefreq = ""monthly""
    i18n=True

    def __init__(self, language):
        self.language = language

    def items(self):
        return Pages.objects.filter(is_show=True)

sitemaps = {}
for language in settings.LANGUAGES:
     sitemaps['pages-%s' % language[0]] = PagesSitemap(language[0])

urlpatterns += [
     url(r'^sitemap.xml$', sm_views.index, {'sitemaps': sitemaps}),
     url(r'^sitemap-(?P<section>.+)\.xml$', sm_views.sitemap, {'sitemaps': sitemaps}),
 ]
}}}

and get error

{{{
NoReverseMatch at /sitemap.xml
Reverse for 'django.contrib.sitemaps.views.sitemap' with arguments '()' and keyword arguments '{'section': 'pages-en'}' not found. 0 pattern(s) tried: []
Request Method:	GET
Request URL:	http://127.0.0.1:8101/sitemap.xml
Django Version:	1.10.2
Exception Type:	NoReverseMatch
Exception Value:	
Reverse for 'django.contrib.sitemaps.views.sitemap' with arguments '()' and keyword arguments '{'section': 'pages-en'}' not found. 0 pattern(s) tried: []
Exception Location:	.venv/local/lib/python2.7/site-packages/django/urls/resolvers.py in _reverse_with_prefix, line 392
Python Executable:	.venv/bin/python
Python Version:	2.7.9
}}}

before update to 1.10.x - it's worked well with Django = 1.6.x to 1.9.x
truble only with 1.10.x"	Bug	closed	Documentation	1.10	Normal	fixed	sitemap		Accepted	1	0	0	0	0	0
