Ticket #2643: sitemaps.diff

File sitemaps.diff, 1.6 KB (added by dummy@…, 18 years ago)
  • django/contrib/sitemaps/__init__.py

     
    1616    if sitemap_url is None:
    1717        try:
    1818            # First, try to get the "index" sitemap URL.
    19             sitemap_url = urlresolvers.reverse('django.contrib.sitemap.views.index')
     19            sitemap_url = urlresolvers.reverse('django.contrib.sitemaps.views.index')
    2020        except urlresolvers.NoReverseMatch:
    2121            try:
    2222                # Next, try for the "global" sitemap URL.
    23                 sitemap_url = urlresolvers.reverse('django.contrib.sitemap.views.sitemap')
     23                sitemap_url = urlresolvers.reverse('django.contrib.sitemaps.views.sitemap')
    2424            except urlresolvers.NoReverseMatch:
    2525                pass
    2626
  • django/contrib/sitemaps/views.py

     
    88    sites = []
    99    protocol = request.is_secure() and 'https' or 'http'
    1010    for section in sitemaps.keys():
    11         sitemap_url = urlresolvers.reverse('django.contrib.sitemap.views.sitemap', kwargs={'section': section})
     11        sitemap_url = urlresolvers.reverse('django.contrib.sitemaps.views.sitemap', kwargs={'section': section})
    1212        sites.append('%s://%s%s' % (protocol, current_site.domain, sitemap_url))
    1313    xml = loader.render_to_string('sitemap_index.xml', {'sitemaps': sites})
    1414    return HttpResponse(xml, mimetype='application/xml')
Back to Top