https://github.com/eventbrite/django-audit-log
Audit log for your Django models
https://github.com/eventbrite/django-audit-log
Last synced: 3 months ago
JSON representation
Audit log for your Django models
- Host: GitHub
- URL: https://github.com/eventbrite/django-audit-log
- Owner: eventbrite
- License: bsd-3-clause
- Created: 2011-10-28T05:32:14.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2023-05-17T19:06:42.000Z (about 2 years ago)
- Last Synced: 2023-05-17T19:27:52.853Z (about 2 years ago)
- Language: Python
- Homepage:
- Size: 39.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
- Audit: audit_log/README.rst
Awesome Lists containing this project
README
============================
django-audit-log
============================Introduction
============================What It Does
----------------------------Lets you keep track of who changed what
model instance in you Django application. Full
model structure is tracked and kept in a separate
table similar in structure to the original model table.Let's say a user logs in the admin and adds a Product model instance.
The audit log will track this in a separate table with the exact structure of you
Product table plus a reference to the user, the time of the action and type of action
indicating it was an insert.Next the user does an update of the same Product instance. The audit log table
will keep the previous entry and another one will be added reflecting the change.When the user deletes the same model instance the audit log table will have an entry
indicating this with the state of the model before it was deleted.
What It Doesn't Do
----------------------------The audit log bootstraps itself on each POST, PUT or DELETE request. So it
can only track changes to model instances when they are
made via the web interface of your application. Note: issuing a delete in a PUT
request will work without a problem (but don't do that). Saving
model instances through the Django shell for instance won't
reflect anything in the audit log. Neither will direct INSERT, UPDATE or DELETE
statements, either within a request lifecycle or directly in your database shell.