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


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 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page