django-model-utils icon indicating copy to clipboard operation
django-model-utils copied to clipboard

Add FieldTracker.diff

Open lucasrcezimbra opened this issue 1 year ago • 0 comments

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.rst file to describe the changes, and quote according issue with GH-<issue_number>.
  • [X] Pay attention to backward compatibility, or if it breaks it, explain why.
  • [X] Update documentation (if relevant).

lucasrcezimbra avatar Oct 31 '24 10:10 lucasrcezimbra