def unregister_signal_handlers(): Image = get_image_model() for model in PAGE_MODEL_CLASSES: page_published.disconnect(purge_page_from_cache, sender=model) page_unpublished.disconnect(purge_page_from_cache, sender=model) post_save.disconnect(purge_image_from_cache, sender=Image) post_delete.disconnect(purge_image_from_cache, sender=Image) post_save.disconnect(purge_document_from_cache, sender=Document) post_delete.disconnect(purge_document_from_cache, sender=Document)
def disconnect_page_signals_handlers(): page_published.disconnect(page_pub_receiver, sender=JournalPage) page_unpublished.disconnect(page_unpub_receiver, sender=JournalPage) page_published.disconnect(about_page_pub_receiver, sender=JournalAboutPage) page_unpublished.disconnect(about_page_unpub_receiver, sender=JournalAboutPage)