I
I
iegor2016-06-17 21:54:57
Django
iegor, 2016-06-17 21:54:57

Track a field change in a model?

It is necessary to hang up a signal on changes of a field of tables. Can anyone tell me if anyone had a similar problem and how did you end up solving it? So far, just hang up on presave and compare the value of the instance with the value in the database, but I don’t really want to make an extra request.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2016-06-17
@iegor

savings on matches - do it on request

E
Egor Kazantsev, 2016-06-17
@saintbyte

So django.db.models.signals.pre_save and update_fields

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question