django-auditlog icon indicating copy to clipboard operation
django-auditlog copied to clipboard

Make timestamp of LogEntry overwritable

Open crazyscientist opened this issue 6 years ago • 3 comments

  • Replaced auto_now_add=True with default=timezone.now
  • Added two testcases
  • Added migration

This is very handy in order to import historic data from another source.

This relates to #199

crazyscientist avatar Jan 16 '19 08:01 crazyscientist

Codecov Report

Merging #200 into master will increase coverage by 0.15%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
+ Coverage   83.43%   83.59%   +0.15%     
==========================================
  Files          19       20       +1     
  Lines         513      518       +5     
==========================================
+ Hits          428      433       +5     
  Misses         85       85
Impacted Files Coverage Δ
src/auditlog/models.py 83.42% <100%> (ø) :arrow_up:
...tlog/migrations/0008_logentry_timestamp_default.py 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a22978e...2f09c37. Read the comment docs.

codecov-io avatar Jan 16 '19 09:01 codecov-io

Codecov Report

Merging #200 into master will increase coverage by 0.15%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
+ Coverage   83.43%   83.59%   +0.15%     
==========================================
  Files          19       20       +1     
  Lines         513      518       +5     
==========================================
+ Hits          428      433       +5     
  Misses         85       85
Impacted Files Coverage Δ
src/auditlog/models.py 83.42% <100%> (ø) :arrow_up:
...tlog/migrations/0008_logentry_timestamp_default.py 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a22978e...2f09c37. Read the comment docs.

codecov-io avatar Jan 16 '19 09:01 codecov-io

Hi! Thank you for your PR. Could you rebase, please ? Thanks

Linkid avatar Jan 04 '22 08:01 Linkid

Superseded by https://github.com/jazzband/django-auditlog/pull/478

hramezani avatar Dec 16 '22 08:12 hramezani