Adding Foriegn Key Only Fields
When building the changes JSON for a LogEntry, following
relations (e.g. ForeigKey fields) can resutl in a
significant performance penalty. This commit adds support for
only logging to foreign key value, by specifying
fields to log in this manner wiht a fk_only_fields
when registering a model with the audit log.
Codecov Report
Merging #280 into master will increase coverage by
0.28%. The diff coverage is100.00%.
@@ Coverage Diff @@
## master #280 +/- ##
==========================================
+ Coverage 82.20% 82.49% +0.28%
==========================================
Files 18 18
Lines 489 497 +8
==========================================
+ Hits 402 410 +8
Misses 87 87
| Impacted Files | Coverage Δ | |
|---|---|---|
| auditlog/diff.py | 88.23% <100.00%> (+1.13%) |
:arrow_up: |
| auditlog/registry.py | 91.37% <100.00%> (+0.30%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 31418d5...8975d57. Read the comment docs.
Thank you @ndwhelan for your PR. Can you please rebase it?