Ticket #4348: google_sitemap_ping.diff
File google_sitemap_ping.diff, 793 bytes (added by , 18 years ago) |
---|
-
django/contrib/sitemaps/__init__.py
1 1 from django.core import urlresolvers 2 2 import urllib 3 3 4 PING_URL = "http://www.google.com/webmasters/ sitemaps/ping"4 PING_URL = "http://www.google.com/webmasters/tools/ping" 5 5 6 6 class SitemapNotFound(Exception): 7 7 pass … … 29 29 30 30 from django.contrib.sites.models import Site 31 31 current_site = Site.objects.get_current() 32 url = " %s%s" % (current_site.domain, sitemap_url)32 url = "http://%s%s" % (current_site.domain, sitemap_url) 33 33 params = urllib.urlencode({'sitemap':url}) 34 34 urllib.urlopen("%s?%s" % (ping_url, params)) 35 35