viroconwebcontour.signals module

Signals to correctly delete models and associated files.

contour.signals.delete_file(sender, instance=None, **kwargs)[source]

Deletes media files when the corresponding the DjangoModel is deleted.

Parameters:
  • sender (Class of object that was deleted,) – E.g. the class MeasureFileModel or ProbabilisticModel.
  • instance (The object that was deleted,) – E.g. a MeasureFileModel or ProbabilisticModel object.