I'm trying to create an audit trail for a particular model, capturing
all changes made on the objects.
My immediate idea was to subclass the save() method on the model and
compare the values both before and after calling the parent save
method. This would work, but it would mean I would have to update this
whenever a new field was added to the model which is both non-DRY and
rather tedious.
Is there any django way of doing this? Something like:
def save():
for all fields in this object:
if field is now different:
do audit here
super(blah, self).save()
Cheers,
Ben.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---