import threading from contextlib import contextmanager _state = threading.local()
from django.db import models from django.utils import timezone class SoftDeleteQuerySet(models.QuerySet): def delete(self):