code: def delete(self, hard=False):
  
          
  
          if hard:
              return models.Model.delete(self)
          self.status = "deleted"
          self.save()
          for key in self._handleref.delete_cascade:
              q = getattr(self, key).all()
  
              if not hard:
                  # if we are soft deleting only trigger delete on
                  # objects that are not already deleted, as to avoid
                  # unnecessary re-saves and overriding of updated dates
                  q = q.exclude(status="deleted")
  
              for child in q:
                  child.delete(hard=hard)
docs: Override the vanilla delete functionality to soft-delete
          instead. Soft-delete is accomplished by setting the
          status field to "deleted"
  
          Arguments:
  
          hard <bool=False> if true, do a hard delete instead, effectively
          removing the object from the database