Skip to main content

Postgres audit triggers for Django

Project description

Postgres audit database via triggers

This app sets up a postgres audit database via triggers. See https://wiki.postgresql.org/wiki/Audit_trigger_91plus and https://github.com/2ndQuadrant/audit-trigger/ for more information.

Installation

pip install postgres_audit_triggers

Usage

  • Add the postgres_audit_triggers app to INSTALLED_APPS before any apps that will be audited:
# settings.py
INSTALLED_APPS = {
    'postgres_audit_triggers',
    ...
}
  • Run migrations: python manage.py migrate postgres_audit_triggers
  • Add audit_trigger = True to the Model Meta options of the models that will be audited:
# models.py
class MyAuditedModel(models.Model):
    ...
    class Meta:
        audit_trigger = True
        ...
  • Make migrations: python manage.py makemigrations
  • Run migrations: python manage.py migrate

Project details


Download files

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

Files for postgres-audit-triggers, version 0.1.7
Filename, size File type Python version Upload date Hashes
Filename, size postgres_audit_triggers-0.1.7.tar.gz (8.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page