pypi / django-auditlog
django-auditlog
What changed in django-auditlog 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.
11 breaking1 security10 new APIs and options2 behavior and defaults5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initdjango-auditlog 323 changes
Breaking changes 7
Python 3.9 support is dropped, so developers must use a supported Python version.
Invalid apps in settings raise AuditLogRegistrationError.
Changes the change field to a JSON field.
Drops support for Django 4 and Django 4.1; confirms support for Django 4.2 and 5.0.
Sets history delete_related to False by default.
The signal receives instance_old and the LogEntry instance, and fires only when a log is created or an error occurs.
Drops support for Python 3.7.
New APIs and options 9
A setting was added to override use of the default manager.
CustomLogEntry models are now supported.
A new setting controls how foreign-key changes are represented.
Adds correlation ID support to audit logging.
Adds the ability to exclude fields by name across all models.
Users can choose to run the JSON migration asynchronously.
Adds the ability to conditionally disable or enable logging.
Adds custom hooks before and after logging.
Adds the ability to disable logging of the remote IP address.
Behavior and default changes 2
Allows cascade deletion of auditlog entries.
The timestamp in LogEntry can be overwritten.
Fixes and other changes 5
Fixes an AttributeError when AUDITLOG_LOGENTRY_MODEL is not set.
Diffing is more robust for polymorphic models.
Does not set the correlation ID when AUDITLOG_CID_GETTER is None.
Returns an empty dictionary when json.loads() returns None.
Fixes manual logging when the model is not registered.
django-auditlog 26 changes
Breaking changes 4
The default_app_config configuration has been removed.
Django 2.2 is no longer supported.
The django_jsonfield_backport package is no longer required.
LogEntry no longer saves to the same database instance the audited model is using.
Security 1
The register argument mask_fields lets you mask sensitive information when logging.
New APIs and options 1
Database choice can be delegated to DATABASES_ROUTER, enabling use of a replica database.