Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2643 -- Fixed incorrect reverse() view names in sitemaps contr…

…ib app. Thanks for the patch, dummy@habmalnefrage.de

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3710 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 5a1d560fb370a2f7dfd2477022e028106aa15de6 1 parent 46d7def
Adrian Holovaty authored
4  django/contrib/sitemaps/__init__.py
@@ -16,11 +16,11 @@ def ping_google(sitemap_url=None, ping_url=PING_URL):
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
 
2  django/contrib/sitemaps/views.py
@@ -8,7 +8,7 @@ def index(request, sitemaps):
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')

0 notes on commit 5a1d560

Please sign in to comment.
Something went wrong with that request. Please try again.