Sitemaps documentation should mention dispatchers
|Reported by:||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In the sitemap documentation there is a suggestion that a good place to call ping_google() is in a models save method. This should be changed to mention dispatchers, as it is far more "correct" to connect to the post_save signal to ping google, instead of doing so in save_methods.
from django.db.models import signals from django.dispatch import dispatcher def ping(sender, args, kwargs): try: ping_google() except Exception: pass dispatcher.connect(ping, sender=Entry, signal=signals.post_save)