django-model-auditmatic

Audit support for Django models using PostgreSQL triggers and stored procedures.


Keywords
audit-logs, audit-trail, django, django-models, postgresql
License
MIT
Install
pip install django-model-auditmatic==0.2.0

Documentation

Work in progress - this probably doesn't work well yet.

Usage

Add django_auditmatic to INSTALLED_APPS.

INSTALLED_APPS.append("django_auditmatic")

Configure which models you want to audit in settings.py

AUDITMATIC = {
    "apps": {
        "auth": {
            "User": {"m2m": any},
        }
    }
}

For example will only include the User model from the auth app, along with any many-to-many relationships.

Then run:

python manage.py install_audit