Django Audit Log Middleware
This package adds simple audit logging to a Django project.
A log is generated at info level each time a request is made. The log includes the following information:
A UTC timestamp
Request method (HTTP verb)
Full URL
IP address
A value from a custom user field (see below)
The requesting user’s email address
The requesting user’s first name
The requesting user’s last name
Installation
pip install django-audit-log-middleware
Usage
Using in a Django middleware configuration:
INSTALLED_APPS = [
...
"django_audit_log_middleware",
]
MIDDLEWARE = [
...
"django_audit_log_middleware.AuditLogMiddleware",
]
Dependencies
This project is a Django app and depends on the Django package.
This package uses Django IPware https://github.com/un33k/django-ipware for IP address capture.
Settings
AUDIT_LOG_USER_FIELD
Provide to define a field on your user model that should be captured in the audit log. Email, first name and last name are captured by default.
Tests
$ pip install -r requirements.txt
$ tox
Metadata
Release files for django-audit-log-middleware 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_audit_log_middleware-0.0.6.tar.gz | 3.8 kB | With provenance | Details for django_audit_log_middleware-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_audit_log_middleware-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for django_audit_log_middleware-0.0.6-py3-none-any.whl |
Total release size: 8.6 kB
Release files / django_audit_log_middleware-0.0.6.tar.gz
| Download URL | django_audit_log_middleware-0.0.6.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7badca9b12d53a1b35ff4b0fc8a16e6a21482a6ceb60a9fcbf64cd1b7f8a6c86
|
|
BLAKE2b-256 checksum How to use checksums |
ee1043082e379657b802b35b0de727f4927c9642df94ed964458c80248d559e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.
Transparency logRelease files / django_audit_log_middleware-0.0.6-py3-none-any.whl
| Download URL | django_audit_log_middleware-0.0.6-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c646cc5014b621ba0195d8e49efb008fd1ef9c8d0003e358f64e06d6829fa56
|
|
BLAKE2b-256 checksum How to use checksums |
da1c4edd53419b8e7f2448881e2f412e43ab6e0901b320a7c90665a6e8da9207
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.
Transparency logSecurity for django-audit-log-middleware 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for django_audit_log_middleware-0.0.6.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.