Skip to main content

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

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)

Source distribution for django-audit-log-middleware 0.0.6
File Size Uploaded
django_audit_log_middleware-0.0.6.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-audit-log-middleware 0.0.6
File Interpreter ABI Platform
django_audit_log_middleware-0.0.6-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page