A simple Django app to saving logs.
Project description
AuditLog is a simple django-app for saving logs of activities performed on models.
Quick start
Add auditlog to your INSTALLED_APPS setting like this:
` INSTALLED_APPS = [` ` …` ` ‘auditlog’,` ` ]`
Include the auditlog_db database settings:
DATABASES = { ` …,` ` ‘auditlog_db’: {` ` ‘ENGINE’: ‘django.db.backends.sqlite3’,` ` ‘NAME’: os.path.join(BASE_DIR, ‘auditlog.sqlite3’),` ` }` ` }`
Run python manage.py migrate to create the auditlog models.
- To saving log use the piece of code in each view that you want to saving audit:
AuditLogDispatcher.send(sender=NotaFiscal, user=request.user, instance=instance, acao=’some action’)
- The acao parameter can be:
1. create 1. update 1. delete
Project details
Release history Release notifications | RSS feed
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
Hashes for django_auditorialog-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3673d1c1e607d67090bd7464d101244acdb6a8ca6b5da114e6b61a4bf1548011 |
|
MD5 | ddb3138f38e01728972c409820ad16ce |
|
BLAKE2b-256 | 29a04717afc50d9e06ac9eaefc5c6e2b8aae6db349fad3e0896077a460070024 |