### Eclipse Workspace Patch 1.0
#P Django trunk
|
|
|
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, sitemap_url_name=None): |
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_name = sitemap_url_name or 'django.contrib.sitemaps.views.sitemap' |
| 18 | sitemap_url = urlresolvers.reverse(sitemap_url_name, kwargs={'section': section}) |
18 | 19 | sites.append('%s://%s%s' % (protocol, current_site.domain, sitemap_url)) |
19 | 20 | if pages > 1: |
20 | 21 | for page in range(2, pages+1): |