code: def delete_renditions_if_master_has_changed(sender, instance, **kwargs):
      '''if master file as changed delete all renditions'''
      try:
          obj = sender.objects.get(pk=instance.pk)
      except sender.DoesNotExist:
          pass  # Object is new, so field hasn't technically changed.
      else:
          if not obj.master == instance.master:  # Field has changed
              obj.master.delete(save=False)
              instance.delete_all_renditions(f delete_renditions_if_master_has_changed(sender, instance, **kwargs):
      '''if master file as changed delete all renditions'''
      try:
          obj = sender.objects.get(pk=instance.pk)
      except sender.DoesNotExist:
          pass  # Object is new, so field hasn't technically changed.
      else:
          if not obj.master == instance.master:  # Field has changed
              obj.master.delete(save=False)
              instance.delete_all_renditions()
docs: if master file as changed delete all renditions