Package for easy creation of audit logs in Django projects
Project description
Django Auditor Logs is a Django app that provides a simple way to log events CREATE, UPDATE AND DELETE in your Django project. It is designed to be used with the Graphene Django package or Django Graphbox, but can be used with any Django project.
Installation
pip install django-auditor-logs
Quick start
- Add “django_auditor_logs” to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [ ... 'django_auditor_logs', ]
- Configure AUDIT_APPS in your settings.py file like this::
AUDIT_APPS = [ 'app1', 'app2', ]
Run python manage.py migrate to create the django_auditor_logs models.
- Optionally you can change MIGRATION_MODULES in your settings.py file like this::
MIGRATION_MODULES = { 'django_auditor_logs': 'app1.migrations', }
- User and request metadata is set by a middleware. Add the middleware to your MIDDLEWARE setting like this::
MIDDLEWARE = [ ... 'django_auditor_logs.middleware.metadata_middleware.MetadataMiddleware', ]
Release notes
- 1.0.0
Initial release.
- 1.0.1
Replace decorator and __user_metadata__ and __request_metadata__ fields by a MetadataManager class used in a Middleware.
- 1.0.2
Fix documentation of the middleware.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django_auditor_logs-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed33e911db79bbdd803f0558aa056f3b330b9826fa1df981cd47e3d9e1cf56d9 |
|
MD5 | 38e2b19f646d5e737ff38f53fbdbf483 |
|
BLAKE2b-256 | 2f4a9ebac1ddfd1f0cd438bdf7ddb74ffdf59a423846a2ec980cc8462472ef9b |
Close
Hashes for django_auditor_logs-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c15f31a4d9dbe15d47fa16def0d47deb319e231af0956da7230d1c9a30fea39 |
|
MD5 | 51d6cf823ec96f9374c5e3888a33a963 |
|
BLAKE2b-256 | 48172f87bcbf2546f3f2c6666a7bd688d8b5716a4c747f09958affdc142de821 |