[Fixed]-Tracking changes to all models in Django

15👍

Have you explored on django signals pre_save?https://docs.djangoproject.com/en/dev/topics/signals/

from django.db.models.signals import pre_save          
from django.dispatch import receiver
from myapp.models import MyModel

@receiver(pre_save, sender=MyModel)
def my_handler(sender, instance=None, **kwargs):
    # instance variable will have the record which is about to be saved. 
    # So log your details accordingly.

Leave a comment