* 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>
* 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 test runner and improve test with multi databases
* Enhance cross-database compatibility and testing
- Fix TRUNCATE command support detection for different databases
- Add conditional PostgreSQL-specific model registration
- Improve database-specific test skipping logic
- Remove SQLite from TRUNCATE supported vendors list
* Add docker compose for testing
* Improve CI/CD with multi-database support
- Add separate test workflows for SQLite, PostgreSQL, and MySQL
* Add `mysqlclient` deps
* fix minor
- Add mysqlclient deps
- upload coverage step
* Fix coverage upload name conflicts in CI workflow
- Add database type to coverage upload names (SQLite/PostgreSQL/MySQL)
* Add support for Django 5.2
* Update setup.py
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
* docs: mention Django 5.2 in requirements and changelog
* docs: only keep Django 5.2 support line in changelog improvements
* docs: move and update Django 5.2 changelog entry with PR reference
* Update CHANGELOG.md
---------
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
* Refactor: re-arrange test application
This was triggered by the need to run "python manage.py", which is impossible when serving the whole project in the same directory as is configured in INSTALLED_APPS ("auditlog_tests"). This setup is heavily inspired by other jazzband projects.
* Add check for missing migrations
* Initial GitHub Actions workflow.
* Use correct Postgres port.
* Fix duplicate.
* Use POSTGRES_HOST?
* Fixing postgres config?
* Pass test env vars with Tox.
* Work around issue with Django 3.1.
* Write coverage file.
* Add release workflow.
* Remove Travis config file.
* Update .github/workflows/test.yml
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update auditlog_tests/tests.py
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update .github/workflows/test.yml
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update README.md
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Add Django 3.1 to tox config.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Add changes for django 2.0
Made the following changes to ensure compatibility with django 2.0:
1. Replaced function calls to `is_authenticated()` with reference to
property `is_authenticated`.
2. Added try/except call to import `django.core.urlresolvers` (now
called `django.urls`.
Also added an `... as ...` statement to ensure that references in the
code to `urlresolvers` don't need to be changed.
3. Fixed calls statement of `on_delete` arg to all ForeignKey
fields.
Note that previously a kwarg was acceptable, but this is now a
positional arg, and the selected `on_delete` method has been
retained.
* Update tox tests and consequentual changes
Updated tox.ini to also test django 2.0 on python 3+. Some changes made
to previous commits required to ensure all tests passed:
- Added `compat.py` to have a `is_authenticated()` function to check
authentication.
This was necessary as the property/method call for `is_authenticated`
is no compatible between django 1.8 (LTS) and 2.0.
Changed AuditLogMiddleware to call this compatibility function instead
of the django built-ins as a result.
- Changes made to `auditlog/models.py` to apply kwargs to both `to=` and
`on_delete=` for consistency of handling in all version tested.
Incorrect django version specified for tox.ini. Now fixed.
* Add 'on_delete' kwarg to initial migration
Added and re-arranged 'on_delete' and 'to' kwargs in initial migration
to ensure compatbility with later versions of Django.
Also included updated manifest with changes required due to django 2.0
work.
* Add TestCase for compat.py
Added simple test case for compat.py file.
* Changes follow code review 2017-12-21
* More changes following code review 2017-12-28
1. Added detailed commentary to `compat.py` to ensure reason why
`is_authenticated()` compatibility function is needed
2. Changed `hasattr` to `callable` in compat.is_authenticated()
3. Fixed typo in migration 0001 to use correct `on_delete` function
* Ignore new testing related files
* Add tox testing, coverage and codecov integration.
Drop Django 1.9 testing as support officially ended in April,
Add Django 1.11 testing, the new LTS version of Django
Add testing against Django for each versions supported python versions.
Remove Django from requirements, install handled through tox for tests and
regular repositories do not need us to install Django for them or enforce
a django version, they can choose to use a supported version or not.
* Update for python 3.6 tests