Hugo van Kemenade
2bf675fceb
pip install . during RTD build ( #578 )
2023-10-27 19:31:36 +03:30
pre-commit-ci[bot]
6b7f4a7ed4
[pre-commit.ci] pre-commit autoupdate ( #574 )
...
updates:
- [github.com/psf/black: 23.9.1 → 23.10.0](https://github.com/psf/black/compare/23.9.1...23.10.0 )
- [github.com/asottile/pyupgrade: v3.13.0 → v3.15.0](https://github.com/asottile/pyupgrade/compare/v3.13.0...v3.15.0 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-24 10:32:31 +03:30
Hasan Ramezani
e15a610dc9
Prepare release 3.0.0-beta.2 ( #573 )
2023-10-05 13:38:57 +02:00
Abdullah Alaqeel
d4ae5cc2b6
fix: change verbose_name in changes_text migration ( #571 )
2023-10-05 11:52:45 +02:00
Hasan Ramezani
2ebaf40476
Update pre-commit repos ( #569 )
2023-09-26 16:26:26 +02:00
Hasan Ramezani
e699e7d118
Update postgres to 13 ( #568 )
2023-09-26 08:29:41 +02:00
Abdullah Alaqeel
ccc59e85f1
fix: don't set the correlation_id if the AUDITLOG_CID_GETTER is None ( #565 )
2023-09-20 13:23:45 +03:00
pre-commit-ci[bot]
459f4b1521
[pre-commit.ci] pre-commit autoupdate ( #564 )
...
updates:
- [github.com/asottile/pyupgrade: v3.10.1 → v3.11.0](https://github.com/asottile/pyupgrade/compare/v3.10.1...v3.11.0 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-18 22:33:26 +02:00
Abdullah Alaqeel
720ab2795d
chore: add a check arg to the migration command ( #563 )
...
* chore: add a check arg to the migration command
* chore: add a check arg to the migration command
2023-09-13 18:03:04 +02:00
pre-commit-ci[bot]
991d47b1e2
[pre-commit.ci] pre-commit autoupdate ( #562 )
...
updates:
- [github.com/psf/black: 23.7.0 → 23.9.1](https://github.com/psf/black/compare/23.7.0...23.9.1 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-11 23:08:30 +02:00
Aleh Rymašeŭski
ac737fd55c
Stop deleting log entries in log_create ( #559 )
2023-09-11 16:16:37 +02:00
Abdullah Alaqeel
af31261946
fix: only fire the post_log signal when the log is created or when there is an error ( #561 )
2023-09-07 14:28:47 +02:00
Saeed Rasooli
858034b0c1
pass instance_old to post_log.send ( #558 )
2023-08-30 10:03:06 +02:00
Abdullah Alaqeel
9f1a09bde7
Prepare for 3.0.0 beta release ( #555 )
2023-08-29 13:46:48 +02:00
Aleh Rymašeŭski
c52786855b
Allow cascade deletion of auditlog entries ( #556 )
...
* Allow cascade deletion of auditlog entries
* Cache iteration over self.urls
2023-08-27 11:12:39 +02:00
Aleh Rymašeŭski
fb1ae7abed
Set history delete_related to False by default ( #557 )
...
This is a breaking change. The default behavior is to delete the
related objects, but it doesn't make sense to apply it to audit log
entries, at least not by default.
2023-08-24 17:25:56 +02:00
pre-commit-ci[bot]
699d8380b2
[pre-commit.ci] pre-commit autoupdate ( #554 )
...
updates:
- [github.com/PyCQA/flake8: 6.0.0 → 6.1.0](https://github.com/PyCQA/flake8/compare/6.0.0...6.1.0 )
- [github.com/asottile/pyupgrade: v3.9.0 → v3.10.1](https://github.com/asottile/pyupgrade/compare/v3.9.0...v3.10.1 )
- [github.com/adamchainz/django-upgrade: 1.14.0 → 1.14.1](https://github.com/adamchainz/django-upgrade/compare/1.14.0...1.14.1 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-22 13:20:42 +03:00
Abdullah Alaqeel
96a8ded086
chore: upgrade github action versions ( #553 )
2023-08-13 22:43:57 +02:00
Abdullah Alaqeel
134ef73723
feat: give users the option to run the json migration asyncly ( #495 )
2023-08-13 11:38:21 +02:00
Abdullah Alaqeel
f2591e420b
feat: collect all models including auto created ones and excluding non-managed ones ( #550 )
...
feat: automatically register m2m fields for models when opting to auto register models
2023-08-09 17:11:21 +02:00
pre-commit-ci[bot]
3dc4f1a02d
[pre-commit.ci] pre-commit autoupdate ( #547 )
...
updates:
- [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-17 23:44:44 +02:00
Hasan Ramezani
2c595f174c
Drop support for Python 3.7 ( #546 )
2023-07-13 23:56:08 +02:00
pre-commit-ci[bot]
060473919b
[pre-commit.ci] pre-commit autoupdate ( #543 )
...
updates:
- [github.com/asottile/pyupgrade: v3.8.0 → v3.9.0](https://github.com/asottile/pyupgrade/compare/v3.8.0...v3.9.0 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-13 23:29:53 +02:00
Hasan Ramezani
9bcc511e21
Fix a bug in serialized_data with F expressions ( #544 )
2023-07-13 08:53:47 +02:00
pre-commit-ci[bot]
875c6b789f
[pre-commit.ci] pre-commit autoupdate ( #541 )
...
updates:
- [github.com/asottile/pyupgrade: v3.7.0 → v3.8.0](https://github.com/asottile/pyupgrade/compare/v3.7.0...v3.8.0 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-03 22:08:05 +02:00
Hasan Ramezani
8f7dd324a6
Drop Django 4 support ( #540 )
2023-07-03 12:17:35 +02:00
pre-commit-ci[bot]
034384624d
[pre-commit.ci] pre-commit autoupdate ( #534 )
...
updates:
- [github.com/asottile/pyupgrade: v3.4.0 → v3.7.0](https://github.com/asottile/pyupgrade/compare/v3.4.0...v3.7.0 )
- [github.com/adamchainz/django-upgrade: 1.13.0 → 1.14.0](https://github.com/adamchainz/django-upgrade/compare/1.13.0...1.14.0 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-24 15:24:50 +03:00
Fırat Kılıç
7f2a3e395d
Fix unnecessary log when adding already existed m2m record ( #535 )
2023-06-21 17:55:29 +03:30
Hasan Ramezani
45591463e8
Confirm Django 4.2 support ( #529 )
2023-05-25 11:15:01 +03:30
Rustam Astafeev
0d9fb8d6fc
fixed getting field's verbose_name ( #508 )
...
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
2023-05-18 01:59:11 +03:30
pre-commit-ci[bot]
bfb3a44296
[pre-commit.ci] pre-commit autoupdate ( #527 )
...
updates:
- [github.com/asottile/pyupgrade: v3.3.2 → v3.4.0](https://github.com/asottile/pyupgrade/compare/v3.3.2...v3.4.0 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-09 18:18:29 +03:30
pre-commit-ci[bot]
59b50907c0
[pre-commit.ci] pre-commit autoupdate ( #523 )
...
updates:
- [github.com/asottile/pyupgrade: v3.3.1 → v3.3.2](https://github.com/asottile/pyupgrade/compare/v3.3.1...v3.3.2 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-08 18:56:27 +03:30
Darren Maki
cd0d3ea311
Audit changes to FK fields when saved using *_id naming. ( #525 )
...
* Audit changes to FK fields when saved using *_id naming.
In Django you can save changes to a FK field on a model using the ID
field name (attname) in addition to the regular FK field name with:
model.related_model_id = 42
model.save(update_fields=["related_model_id'])
or:
model.related_model = related_model
model.save(update_fields=["related_model_id'])
as opposed to the more common:
model.related_model = related_model
model.save(update_fields=["related_model'])
This change ensures those model changes are logged properly.
* Apply suggested change from code review.
* Add a CHANGELOG entry for the fix.
2023-05-08 18:56:01 +03:30
pre-commit-ci[bot]
fa955cd5c7
[pre-commit.ci] pre-commit autoupdate ( #521 )
...
updates:
- [github.com/psf/black: 23.1.0 → 23.3.0](https://github.com/psf/black/compare/23.1.0...23.3.0 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-04-04 13:57:11 +03:30
Alieh Rymašeŭski
818c8ca16a
Fix GitHub actions deprecations ( #520 )
...
* Upgrade versions of github actions
See https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
* Update syntax of set-output directive
See https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2023-04-01 13:45:29 +03:30
pre-commit-ci[bot]
0cb3eb2b99
[pre-commit.ci] pre-commit autoupdate ( #516 )
...
updates:
- [github.com/adamchainz/django-upgrade: 1.12.0 → 1.13.0](https://github.com/adamchainz/django-upgrade/compare/1.12.0...1.13.0 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-20 21:17:01 +01:00
Joey Lange
98fe8d4173
Make M2M changes comply with JSONField properly ( #514 )
2023-02-15 15:10:27 +01:00
Hasan Ramezani
fcb6c4ce27
Fix a bug in audit log admin page when USE_TZ=False ( #511 )
...
Co-authored-by: Ebrahimi <z.ebrahimi.d80@gmail.com>
2023-02-10 17:52:07 +03:00
Hasan Ramezani
7aec22d38c
Add 2.2.2 changelog ( #510 )
2023-02-10 13:17:02 +01:00
pre-commit-ci[bot]
ec591800fe
[pre-commit.ci] pre-commit autoupdate ( #507 )
...
* [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0 )
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-09 09:19:41 +01:00
Hasan Ramezani
3a90087d32
Add null=True to ci field ( #506 )
...
* Add null=True to ci field
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-03 16:33:20 +03:00
pre-commit-ci[bot]
565a9bbef5
[pre-commit.ci] pre-commit autoupdate ( #504 )
...
updates:
- [github.com/PyCQA/isort: 5.11.4 → 5.12.0](https://github.com/PyCQA/isort/compare/5.11.4...5.12.0 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-31 13:17:32 +01:00
Aaron C. de Bruyn
06ae048378
Add ability to globally exclude fields by name on all models ( #498 )
...
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
2023-01-20 15:41:36 +01:00
Hasan Ramezani
7a7e2eb2ef
Run django main tests on Python >= 3.10 ( #499 )
2023-01-19 11:20:45 +03:00
Abdullah Alaqeel
f6b9e9f931
Always call set_actor ( #484 )
2023-01-04 15:05:32 +01:00
Thomas Steen Rasmussen
b9a86df456
raise AuditLogRegistrationError on invalid app in settings ( #492 )
...
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
2023-01-03 16:03:37 +01:00
Cleiton de Lima
ffa6d34b11
Fix repr of a json field in field changes ( #489 )
2022-12-30 08:28:55 +01:00
Aivars Kalvāns
7f8edd5456
Convert AUDITLOG_EXCLUDE_TRACKING_MODELS to tuple before concatenate ( #488 )
2022-12-29 09:09:56 +01:00
pre-commit-ci[bot]
dff0dd0fa5
[pre-commit.ci] pre-commit autoupdate ( #485 )
...
updates:
- [github.com/PyCQA/isort: v5.11.3 → 5.11.4](https://github.com/PyCQA/isort/compare/v5.11.3...5.11.4 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-12-28 09:52:13 +01:00
August Raack
c649629225
Change diff to evaluate PKs for FK relationships ( #420 )
...
* Change diff to evaluate PKs for FK relationships
The diff method now evaluates the primary keys for changes to determine
if a new LogEntry should be created. Previously, the diff method was
evaluating the string representation of the object. This was flawed
because cases can occur when a parent object has in memory changes to
its string string representation and the child related object is saved
prior to these in memory changes being persisted. In these cases a new
LogEntry object would be created erroneously. This cases is asserted
with a test and a regression test will verify the bug.
The consequence of these updates is that the ``LogEntry.changes`` field
now stores primary keys rather than string representations for related
objects. To keep the changes dictionary display unaffected by this
update, a method was added to the ``LogEntry`` model. This method looks
up the object display string from the stored foreign key. Exceptions
were written to handle backwards compatibility.
* Added test case to cover another bug
Because the string representation is not unique for every object, relying
on it to determine FK diffs may not capture all changes. This test case
shows another type of scenario that is fixed by comparing primary keys
rather than object string representations. This is likely occurring
fairly regularly but is hard to spot because it is an error of omission.
* Update to docstring and added changelog
2022-12-28 09:51:44 +01:00