Ticket #13908: patch.diff
File patch.diff, 1.0 KB (added by , 14 years ago) |
---|
-
django/contrib/sitemaps/views.py
5 5 from django.utils.encoding import smart_str 6 6 from django.core.paginator import EmptyPage, PageNotAnInteger 7 7 8 def index(request, sitemaps ):8 def index(request, sitemaps, section_urlname='django.contrib.sitemaps.views.sitemap'): 9 9 current_site = Site.objects.get_current() 10 10 sites = [] 11 11 protocol = request.is_secure() and 'https' or 'http' … … 14 14 pages = site().paginator.num_pages 15 15 else: 16 16 pages = site.paginator.num_pages 17 sitemap_url = urlresolvers.reverse( 'django.contrib.sitemaps.views.sitemap', kwargs={'section': section})17 sitemap_url = urlresolvers.reverse(section_urlname, kwargs={'section': section}) 18 18 sites.append('%s://%s%s' % (protocol, current_site.domain, sitemap_url)) 19 19 if pages > 1: 20 20 for page in range(2, pages+1):