app/django/contrib/sitemaps/management/commands/ping_google.py
changeset 323 ff1a9aa48cfd
equal deleted inserted replaced
322:6641e941ef1e 323:ff1a9aa48cfd
       
     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