mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-16 20:00:23 +00:00
Note FieldTracker signal rules in documentation
This commit is contained in:
parent
3496fe4291
commit
6821051141
1 changed files with 13 additions and 0 deletions
|
|
@ -210,3 +210,16 @@ An example using the model specified above:
|
|||
>>> a.body = 'First post!'
|
||||
>>> a.title_tracker.changed()
|
||||
{'title': None}
|
||||
|
||||
|
||||
Checking changes using signals
|
||||
------------------------------
|
||||
|
||||
The field tracker methods may also be used in ``pre_save`` and ``post_save``
|
||||
signal handlers to identify field changes on model save.
|
||||
|
||||
.. NOTE::
|
||||
|
||||
Due to the implementation of ``FieldTracker``, ``post_save`` signal
|
||||
handlers relying on field tracker methods should only be registered after
|
||||
model creation.
|
||||
|
|
|
|||
Loading…
Reference in a new issue