diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/sitemaps.txt | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt index 3ba601bc67..166013659d 100644 --- a/docs/ref/contrib/sitemaps.txt +++ b/docs/ref/contrib/sitemaps.txt @@ -481,7 +481,7 @@ You may want to "ping" Google when your sitemap changes, to let it know to reindex your site. The sitemaps framework provides a function to do just that: :func:`django.contrib.sitemaps.ping_google()`. -.. function:: ping_google(sitemap_url=None, ping_url=PING_URL) +.. function:: ping_google(sitemap_url=None, ping_url=PING_URL, sitemap_uses_https=True) ``ping_google`` takes these optional arguments: @@ -493,10 +493,18 @@ that: :func:`django.contrib.sitemaps.ping_google()`. * ``ping_url`` - Defaults to Google's Ping Tool: https://www.google.com/webmasters/tools/ping. + * ``sitemap_uses_https`` - Set to ``False`` if your site uses ``http`` + rather than ``https``. + :func:`ping_google` raises the exception ``django.contrib.sitemaps.SitemapNotFound`` if it cannot determine your sitemap URL. + .. versionadded:: 2.2 + + The ``sitemap_uses_https`` argument was added. Older versions of + Django always use ``http`` for a sitemap's URL. + .. admonition:: Register with Google first! The :func:`ping_google` command only works if you have registered your @@ -534,3 +542,9 @@ Once the sitemaps application is added to your project, you may also ping Google using the ``ping_google`` management command:: python manage.py ping_google [/sitemap.xml] + +.. django-admin-option:: --sitemap-uses-http + +.. versionadded:: 2.2 + +Use this option if your sitemap uses ``http`` rather than ``https``. |
