web/lib/django/contrib/sitemaps/management/commands/ping_google.py
changeset 0 0d40e90630ef
equal deleted inserted replaced
-1:000000000000 0:0d40e90630ef
       
     1 from django.core.management.base import BaseCommand
       
     2 from django.contrib.sitemaps import ping_google
       
     3 
       
     4 
       
     5 class Command(BaseCommand):
       
     6     help = "Ping google with an updated sitemap, pass optional url of sitemap"
       
     7 
       
     8     def execute(self, *args, **options):
       
     9         if len(args) == 1:
       
    10             sitemap_url = args[0]
       
    11         else:
       
    12             sitemap_url = None
       
    13         ping_google(sitemap_url=sitemap_url)
       
    14