Skip to main content

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

  1. Add auditlog to your INSTALLED_APPS setting like this:

` INSTALLED_APPS = [` ` …` ` ‘auditlog’,` ` ]`

  1. Include the auditlog_db database settings:

DATABASES = { ` …,` ` ‘auditlog_db’: {` ` ‘ENGINE’: ‘django.db.backends.sqlite3’,` ` ‘NAME’: os.path.join(BASE_DIR, ‘auditlog.sqlite3’),` ` }` ` }`

  1. Run python manage.py migrate to create the auditlog models.
  2. 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’)
  3. The acao parameter can be:
    1. create 1. update 1. delete

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-auditorialog-0.1.tar.gz (4.3 kB view hashes)

Uploaded source

Built Distribution

django_auditorialog-0.1-py3-none-any.whl (7.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page