Merge upstream changes from django auditlog master branch#4
Open
nickmccullum wants to merge 370 commits intomathandpencil:masterfrom
Open
Merge upstream changes from django auditlog master branch#4nickmccullum wants to merge 370 commits intomathandpencil:masterfrom
nickmccullum wants to merge 370 commits intomathandpencil:masterfrom
Conversation
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
This reverts commit 7bc39e6.
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
Readthedoc uses Python3.7 Revert a30c8bb
for more information, see https://pre-commit.ci
Many queries, including the default ordering, for the LogEntry model rely on the timestamp field. Adding an index will ensure reasonable scalability for large audit logs.
* Use list_select_related * [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>
…pply the filter only on date part of timestamp (#384)
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
This attribute is defined on request.user from Django 1.10 or a comparably ancient version.
updates: - [github.com/adamchainz/django-upgrade: 1.25.0 → 1.27.0](adamchainz/django-upgrade@1.25.0...1.27.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Bumps the github-actions group with 1 update: [actions/setup-python](https://github.com/actions/setup-python). Updates `actions/setup-python` from 5 to 6 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Skip incompatible tests on Django 6.0+ refs: - #635 - #646 - https://code.djangoproject.com/ticket/27222 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove skipif * Add changelog --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add locale files * Add Korean translations * Update translation files using LLM * Add missing gettext wrappers for UI strings * Add i18n support for audit log table headers * Add justfile for i18n workflow * Add `.mo` binary file * Update CHANGELOG.md * Add create-locale command to justfile for new language setup * Replace justfile with Makefile
* Add test model and test cases for None value type mismatch - issue #750 @The-Alchemist * Fix None type mismatch in change detection
updates: - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 25.1.0 → 25.9.0](psf/black-pre-commit-mirror@25.1.0...25.9.0) - [github.com/PyCQA/isort: 6.0.1 → 6.1.0](PyCQA/isort@6.0.1...6.1.0) - [github.com/adamchainz/django-upgrade: 1.27.0 → 1.29.0](adamchainz/django-upgrade@1.27.0...1.29.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Drop Python 3.9 support, set minimum version to 3.10 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update CHANGELOG.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix lint error --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add `AUDITLOG_USE_BASE_MANAGER` setting configuration * Adjust `LogEntry._get_changes_display_for_fk_field` behaviour for setting * Adjust `log_update` and `log_m2m_changes` in `receivers.py` for setting * Add `ModelManagerTest.test_use_base_manager_setting` * Add entry in Usage documentation * (In passing, fix a formatting issue in `usage.rst`) The `AUDITLOG_USE_BASE_MANAGER` setting has a default of `False` to maintain initial backwards compatibility with previous versions.
updates: - [github.com/PyCQA/isort: 6.1.0 → 7.0.0](PyCQA/isort@6.1.0...7.0.0) - [github.com/asottile/pyupgrade: v3.20.0 → v3.21.0](asottile/pyupgrade@v3.20.0...v3.21.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add CustomLogEntry model support and update tests: - Added support for CustomLogEntry data model to extend django-auditlog capabilities - Updated existing test cases to align with new model structure and data handling logic - Added new test cases to validate CustomLogEntry behavior, model registration, and signal handling - Ensured backward compatibility with existing LogEntry model where applicable * Update auditlog/__init__.py Co-authored-by: Youngkwang Yang <me@youngkwang.dev> * run only one custom model test matrix (#761) --------- Co-authored-by: Youngkwang Yang <me@youngkwang.dev>
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 5 to 6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
updates: - [github.com/psf/black-pre-commit-mirror: 25.9.0 → 25.11.0](psf/black-pre-commit-mirror@25.9.0...25.11.0) - [github.com/asottile/pyupgrade: v3.21.0 → v3.21.2](asottile/pyupgrade@v3.21.0...v3.21.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add failing test for diffing polymorphic model instances. * Make diffing more robust for polymorphic models: When working with polymorphic models, where a child model inherits from a parent model, Django's pre_save signal may send model instances in a way where the log_update() handler receives an instance of the child as the `old` model, but an instance of the parent as the `new` model. This leads to a `FieldDoesNotExist` error when a field that only exists on the child was modified, and `get_field_value()` attempts look up that field on the parent. This change makes diffing polymorphic models more robust by considering this case in `get_default_value()`. Changes to those child fields won't be tracked in these cases, but at least `django-auditlog` won't prevent the model from being saved.
* add new setting to activate string repr * skip using foreign key to construct and display diff of foreign key fields * concise name and documentation update # Conflicts: # docs/source/usage.rst * add test for enabled setting * fix code block in docs * fix version * add warning to documentation
Bumps the github-actions group with 1 update: [actions/cache](https://github.com/actions/cache). Updates `actions/cache` from 4 to 5 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v4...v5) --- updated-dependencies: - dependency-name: actions/cache dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
updates: - [github.com/psf/black-pre-commit-mirror: 25.11.0 → 25.12.0](psf/black-pre-commit-mirror@25.11.0...25.12.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black-pre-commit-mirror: 25.12.0 → 26.1.0](psf/black-pre-commit-mirror@25.12.0...26.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>
* Add test case to test log entry changes_str property for m2m changes. * Add support for m2m field changes and generic changes in AbstractLogEntry.changes_str property. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add more test cases for changes_str. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add chengelog note * Validate type and length of changes_dict values. * Restructure change iterator. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates: - [github.com/PyCQA/isort: 7.0.0 → 8.0.0](PyCQA/isort@7.0.0...8.0.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates: - [github.com/PyCQA/isort: 8.0.0 → 8.0.1](PyCQA/isort@8.0.0...8.0.1) - [github.com/adamchainz/django-upgrade: 1.29.1 → 1.30.0](adamchainz/django-upgrade@1.29.1...1.30.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates: - [github.com/psf/black-pre-commit-mirror: 26.1.0 → 26.3.0](psf/black-pre-commit-mirror@26.1.0...26.3.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates: - [github.com/psf/black-pre-commit-mirror: 26.3.0 → 26.3.1](psf/black-pre-commit-mirror@26.3.0...26.3.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.