Ticket #13908: patch.diff

File patch.diff, 1.0 KB (added by palewire, 14 years ago)

Add optional kwarg for 'section_urlname'

  • django/contrib/sitemaps/views.py

     
    55from django.utils.encoding import smart_str
    66from django.core.paginator import EmptyPage, PageNotAnInteger
    77
    8 def index(request, sitemaps):
     8def index(request, sitemaps, section_urlname='django.contrib.sitemaps.views.sitemap'):
    99    current_site = Site.objects.get_current()
    1010    sites = []
    1111    protocol = request.is_secure() and 'https' or 'http'
     
    1414            pages = site().paginator.num_pages
    1515        else:
    1616            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})
    1818        sites.append('%s://%s%s' % (protocol, current_site.domain, sitemap_url))
    1919        if pages > 1:
    2020            for page in range(2, pages+1):
Back to Top