#NEWLINE# @ receiver ( post_delete , sender = models . IEDocument ) #NEWLINE# def on_iedocument_delete( sender , instance , **kwargs ) : #NEWLINE# #INDENT# if hasattr ( item , 'to_delete' ) : #NEWLINE# #INDENT# for item in sender . to_delete : #NEWLINE# #INDENT# item . delete ( )