diff --git a/machines/models.py b/machines/models.py index ccada7d6..4cf3941c 100644 --- a/machines/models.py +++ b/machines/models.py @@ -406,6 +406,30 @@ def machine_post_save(sender, **kwargs): def domain_post_save(sender, **kwargs): regen('dns') -@receiver(post_save, sender=Domain) -def domain_post_save(sender, **kwargs): +@receiver(post_delete, sender=Domain) +def domain_post_delete(sender, **kwargs): + regen('dns') + +@receiver(post_save, sender=Mx) +def mx_post_save(sender, **kwargs): + regen('dns') + +@receiver(post_delete, sender=Mx) +def mx_post_delete(sender, **kwargs): + regen('dns') + +@receiver(post_save, sender=Ns) +def ns_post_save(sender, **kwargs): + regen('dns') + +@receiver(post_delete, sender=Ns) +def ns_post_delete(sender, **kwargs): + regen('dns') + +@receiver(post_save, sender=Text) +def text_post_save(sender, **kwargs): + regen('dns') + +@receiver(post_delete, sender=Text) +def text_post_delete(sender, **kwargs): regen('dns') diff --git a/machines/templates/machines/index_extension.html b/machines/templates/machines/index_extension.html index 6c0bb6a9..20587d85 100644 --- a/machines/templates/machines/index_extension.html +++ b/machines/templates/machines/index_extension.html @@ -49,8 +49,8 @@ with this program; if not, write to the Free Software Foundation, Inc., {% include "machines/aff_ns.html" with ns_list=ns_list %}