Files
funnywolf b6b4cbf017 0.4.0 I always have a choice
You shape nothing until you hold everything.
2026-06-27 19:08:48 +08:00

16 lines
410 B
Python

from .context import audit_actor
class AuditActorMixin:
def perform_create(self, serializer):
with audit_actor(self.request.user):
serializer.save()
def perform_update(self, serializer):
with audit_actor(self.request.user):
serializer.save()
def perform_destroy(self, instance):
with audit_actor(self.request.user):
instance.delete()