#NEWLINE# def register_signal_handlers( ) : #NEWLINE# #INDENT# Image = get_image_model ( ) #NEWLINE# Document = get_document_model ( ) #NEWLINE# for model in get_page_models ( ) : #NEWLINE# #INDENT# page_published . connect ( purge_page_from_cache , sender = model ) #NEWLINE# page_unpublished . connect ( purge_page_from_cache , sender = model ) #NEWLINE# #UNINDENT# post_save . connect ( purge_image_from_cache , sender = model ) #NEWLINE# post_delete . connect ( purge_image_from_cache , sender = Image ) #NEWLINE# post_save . connect ( purge_document_from_cache , sender = Document ) #NEWLINE# post_delete . connect ( purge_document_from_cache , sender = Document )