Skip to content

Commit

Permalink
Fixed #2643 -- Fixed incorrect reverse() view names in sitemaps contr…
Browse files Browse the repository at this point in the history
…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
adrianholovaty committed Sep 2, 2006
1 parent 46d7def commit 5a1d560
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions django/contrib/sitemaps/__init__.py
Expand Up @@ -16,11 +16,11 @@ def ping_google(sitemap_url=None, ping_url=PING_URL):
if sitemap_url is None:
try:
# First, try to get the "index" sitemap URL.
sitemap_url = urlresolvers.reverse('django.contrib.sitemap.views.index')
sitemap_url = urlresolvers.reverse('django.contrib.sitemaps.views.index')
except urlresolvers.NoReverseMatch:
try:
# Next, try for the "global" sitemap URL.
sitemap_url = urlresolvers.reverse('django.contrib.sitemap.views.sitemap')
sitemap_url = urlresolvers.reverse('django.contrib.sitemaps.views.sitemap')
except urlresolvers.NoReverseMatch:
pass

Expand Down
2 changes: 1 addition & 1 deletion django/contrib/sitemaps/views.py
Expand Up @@ -8,7 +8,7 @@ def index(request, sitemaps):
sites = []
protocol = request.is_secure() and 'https' or 'http'
for section in sitemaps.keys():
sitemap_url = urlresolvers.reverse('django.contrib.sitemap.views.sitemap', kwargs={'section': section})
sitemap_url = urlresolvers.reverse('django.contrib.sitemaps.views.sitemap', kwargs={'section': section})
sites.append('%s://%s%s' % (protocol, current_site.domain, sitemap_url))
xml = loader.render_to_string('sitemap_index.xml', {'sitemaps': sites})
return HttpResponse(xml, mimetype='application/xml')
Expand Down

0 comments on commit 5a1d560

Please sign in to comment.