#29234: manage.py command "ping_google" requires django.contrib.sites to work 
but
it's not documented
------------------------------------------------+------------------------
               Reporter:  GOTO Hayato           |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Documentation         |        Version:  2.0
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 I tried to use ping_google in my Django site with the following command
 after adding django.contrib.sitemaps to settings.INSTALLED_APPS.

 {{{
 python manage.py ping_google
 }}}

 Then, I got an error like:

 {{{
 django.core.exceptions.ImproperlyConfigured: ping_google requires
 django.contrib.sites, which isn't installed.
 }}}

 Seeing the related code, it seems that the command requires
 django.contrib.sites to be installed to work.

 {{{
 def _get_sitemap_full_url(sitemap_url):
     if not django_apps.is_installed('django.contrib.sites'):
         raise ImproperlyConfigured("ping_google requires
 django.contrib.sites, which isn't installed.")
 }}}

 https://docs.djangoproject.com/en/2.0/_modules/django/contrib/sitemaps/

 I believe it's better to add some notes for this in the documentation.

 https://docs.djangoproject.com/en/2.0/ref/contrib/sitemaps/#pinging-google

 (This is my first challenge to file an issue here. I'm sorry if I'm
 missing or misunderstanding anything crucial.)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29234>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/048.15150e7d8cdd552aa9440c17730a801d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to