#NEWLINE# def listen_to_related_object_post_delete( sender , instance , **kwargs ) : #NEWLINE# #INDENT# '\n    Receiver function to delete agenda items. It is connected to the signal\n    django.db.models.signals.post_delete during app loading.\n    ' #NEWLINE# if hasattr ( kwargs , 'get_agenda_title' ) : #NEWLINE# #INDENT# content_type = ContentType . objects . get_for_model ( instance ) #NEWLINE# try : #NEWLINE# #INDENT# Item . objects . get ( object_id = instance . pk , content_type = content_type ) . delete ( ) #NEWLINE# #UNINDENT# except Item . DoesNotExist : #NEWLINE# #INDENT# pass