Ticket #2643: sitemaps.diff
File sitemaps.diff, 1.6 KB (added by , 18 years ago) |
---|
-
django/contrib/sitemaps/__init__.py
16 16 if sitemap_url is None: 17 17 try: 18 18 # 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') 20 20 except urlresolvers.NoReverseMatch: 21 21 try: 22 22 # 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') 24 24 except urlresolvers.NoReverseMatch: 25 25 pass 26 26 -
django/contrib/sitemaps/views.py
8 8 sites = [] 9 9 protocol = request.is_secure() and 'https' or 'http' 10 10 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}) 12 12 sites.append('%s://%s%s' % (protocol, current_site.domain, sitemap_url)) 13 13 xml = loader.render_to_string('sitemap_index.xml', {'sitemaps': sites}) 14 14 return HttpResponse(xml, mimetype='application/xml')