# What changed in django-auditlog

> 29 changes in django-auditlog 2 to 3 from its official release notes, upgrade guides and advisories: 11 breaking, 1 security, 10 new APIs and options. Each one cited. Sources checked 2026-10-24. HTML: https://unstale.sh/pypi/django-auditlog/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## django-auditlog 3

### Breaking changes

- Python 3.9 support is dropped, so developers must use a supported Python version. (3.4.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.4.0)
- Invalid apps in settings raise AuditLogRegistrationError. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- Changes the change field to a JSON field. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- Drops support for Django 4 and Django 4.1; confirms support for Django 4.2 and 5.0. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- Sets history delete_related to False by default. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- The signal receives instance_old and the LogEntry instance, and fires only when a log is created or an error occurs. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- Drops support for Python 3.7. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)

### New APIs and options

- A setting was added to override use of the default manager. (3.4.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.4.0)
- CustomLogEntry models are now supported. (3.4.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.4.0)
- A new setting controls how foreign-key changes are represented. (3.4.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.4.0)
- Adds correlation ID support to audit logging. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- Adds the ability to exclude fields by name across all models. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- Users can choose to run the JSON migration asynchronously. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- Adds the ability to conditionally disable or enable logging. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- Adds custom hooks before and after logging. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- Adds the ability to disable logging of the remote IP address. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)

### Behavior and default changes

- Allows cascade deletion of auditlog entries. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- The timestamp in LogEntry can be overwritten. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)

### Fixes and other changes

- Fixes an AttributeError when AUDITLOG_LOGENTRY_MODEL is not set. (3.4.1) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.4.1)
- Diffing is more robust for polymorphic models. (3.4.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.4.0)
- Does not set the correlation ID when AUDITLOG_CID_GETTER is None. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- Returns an empty dictionary when json.loads() returns None. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)
- Fixes manual logging when the model is not registered. (3.0.0) — [release notes](https://github.com/django-commons/django-auditlog/releases/tag/v3.0.0)

## django-auditlog 2

### Breaking changes

- The default_app_config configuration has been removed. (2.0.0) — [release notes](https://github.com/jazzband/django-auditlog/blob/HEAD/CHANGELOG.md)
- Django 2.2 is no longer supported. (2.0.0) — [release notes](https://github.com/jazzband/django-auditlog/blob/HEAD/CHANGELOG.md)
- The django_jsonfield_backport package is no longer required. (2.0.0) — [release notes](https://github.com/jazzband/django-auditlog/blob/HEAD/CHANGELOG.md)
- LogEntry no longer saves to the same database instance the audited model is using. (2.0.0) — [release notes](https://github.com/jazzband/django-auditlog/blob/HEAD/CHANGELOG.md)

### Security

- The register argument mask_fields lets you mask sensitive information when logging. (2.0.0) — [release notes](https://github.com/jazzband/django-auditlog/blob/HEAD/CHANGELOG.md)

### New APIs and options

- Database choice can be delegated to DATABASES_ROUTER, enabling use of a replica database. (2.0.0) — [release notes](https://github.com/jazzband/django-auditlog/blob/HEAD/CHANGELOG.md)
