The `ping_google()` helper in the sitemaps framework looks for URLs named
`'django.contrib.sitemaps.views.index'` and then
`'django.contrib.sitemaps.views.sitemap'` to autodetect the sitemap URL,
if one's not provided.
* The docs examples don't show this.
* the [https://docs.djangoproject.com/en/3.2/ref/contrib/sitemaps
/#pinging-google Pinging Google docs] don't explain how the auto-detection
works.
The combination of these two means that you need to look at the source
code to know how to correctly leverage the auto-detection — adding to the
docs would clarify this.
[https://github.com/django/django/pull/14994 Pull Request]
--
Ticket URL: <https://code.djangoproject.com/ticket/33210>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/33210#comment:1>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/33210#comment:2>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"1405dc78872f9d18180feebb4f2c57dbe1259acb" 1405dc7]:
{{{
#!CommitTicketReference repository=""
revision="1405dc78872f9d18180feebb4f2c57dbe1259acb"
Fixed #33210 -- Clarified docs for sitemaps ping_google() helper.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33210#comment:3>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"ac815f6ea83a66122ee434f773f8c923f4cd3125" ac815f6]:
{{{
#!CommitTicketReference repository=""
revision="ac815f6ea83a66122ee434f773f8c923f4cd3125"
[4.0.x] Fixed #33210 -- Clarified docs for sitemaps ping_google() helper.
Backport of 1405dc78872f9d18180feebb4f2c57dbe1259acb from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33210#comment:4>