title: django ping google http error
body: <p>I'm trying to ping Google, but get HTTP Error. Why?
  env/bin/python manage.py ping_google [/sitemap.xml]</p>
  
  <pre><code>Traceback (most recent call last):
    File "manage.py", line 10, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/var/www/wen/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
      utility.execute()
    File "/var/www/wen/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/var/www/wen/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
      self.execute(*args, **options.__dict__)
    File "/var/www/wen/env/local/lib/python2.7/site-packages/django/contrib/sitemaps/management/commands/ping_google.py", line 13, in execute
      ping_google(sitemap_url=sitemap_url)
    File "/var/www/wen/env/local/lib/python2.7/site-packages/django/contrib/sitemaps/__init__.py", line 37, in ping_google
      urlopen("%s?%s" % (ping_url, params))
    File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
      return _opener.open(url, data, timeout)
    File "/usr/lib/python2.7/urllib2.py", line 406, in open
      response = meth(req, response)
    File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
      'http', request, response, code, msg, hdrs)
    File "/usr/lib/python2.7/urllib2.py", line 444, in error
      return self._call_chain(*args)
    File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
      result = func(*args)
    File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
      raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
  urllib2.HTTPError: HTTP Error 400: Bad Request
  </code></pre>
  
  <p>Site map I did it myself.</p>