diff options
| author | Sanyam Khurana <sanyam.khurana01@gmail.com> | 2019-01-10 15:30:00 +0530 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-01-11 10:32:22 -0500 |
| commit | 76d31be2d04dd6e6bcb5cb39a29ea9ed3938d0f9 (patch) | |
| tree | 696b5d2c59b40be4d9f4072967650bb33ed725ff /docs/ref | |
| parent | 6d73278d38e65b5785ce67f21c7ef6d7082aec0a (diff) | |
Refs #23829 -- Made ping_google command/function use https for the sitemap URL.
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``. |
