old_contents: from django.db import models
  from model_utils.models import TimeStampedModel
  from reports.constants import EXPORT_STATUS
  
  
  class Export(TimeStampedModel):
      user = models.ForeignKey('auth.User')
      path = models.CharField(max_length=255, null=True)
      status = models.CharField(max_length=10, choices=EXPORT_STATUS)
      task_id = models.CharField(max_length=100)
      message = models.TextField()
  
new_contents: import os
  from django.db import models
  from django.db.models.signals import pre_delete
  
  from model_utils.models import TimeStampedModel
  from reports.constants import EXPORT_STATUS
  
  
  class Export(TimeStampedModel):
      user = models.ForeignKey('auth.User')
      path = models.CharField(max_length=255, null=True)
      status = models.CharField(max_length=10, choices=EXPORT_STATUS)
      task_id = models.CharField(max_length=100)
      message = models.TextField()
  
  
  def delete_export_file(sender, instance=None, **kwargs):
      os.remove(instance.path)
  
  
  pre_delete.connect(delete_export_file, sender=Export)
  
subject: add pre delete to remove export file