Ticket #7185: ping_google.diff
File ping_google.diff, 1.4 KB (added by , 17 years ago) |
---|
-
django/contrib/sitemaps/management/commands/ping_google.py
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 -
docs/sitemaps.txt
317 317 cron script, or some other scheduled task. The function makes an HTTP request 318 318 to Google's servers, so you may not want to introduce that network overhead 319 319 each time you call ``save()``. 320 321 Once the sitemaps application is added to your project, you may also 322 ping the Google server's through the command line manage.py interface:: 323 324 python manage.py ping_google [/sitemap.xml] 325