user109316
user109316

Reputation: 39

What's the best way to track changes to a model in Django?

I would like my Django app to track any changes to a model whenever a person changes it. So if the name element of a user model changes I'd like to save the following:

-The elements being changed

-The elements' values before the change

-The elements' values after the change

I'm wondering if there's a plugin for Django that makes this easy. Apologies in advance if this is a newbie question.

Upvotes: 3

Views: 389

Answers (1)

inlanger
inlanger

Reputation: 2986

You can track values changes with built-in model signals, like https://docs.djangoproject.com/en/1.9/ref/signals/#module-django.db.models.signals

Upvotes: 2

Related Questions