def delete_handler(sender, instance, **kwargs): if instance: from supertagging.modules import clean_up, remove_from_queue if USE_QUEUE: remove_from_queue(instance) else: clean_up(instance)
def delete_handler(sender, **kwargs): if 'instance' in kwargs: clean_up(kwargs['instance'])