django-model-utils
django-model-utils copied to clipboard
Add FieldTracker.diff
Problem
The FieldTracker.changed returns only the previous version. There is no method that returns previous and current versions at the same time.
Solution
Adds a new method diff to the FieldTracker to return the previous and the current versions of the changed fields.
Commandments
- [X] Write PEP8 compliant code.
- [X] Cover it with tests.
- [X] Update
CHANGES.rstfile to describe the changes, and quote according issue withGH-<issue_number>. - [X] Pay attention to backward compatibility, or if it breaks it, explain why.
- [X] Update documentation (if relevant).