Keep a structured -- i.e. not just log strings -- journal of events in your applications
Project description
Log event to a journal. Keep details of the event linked to the event message, keep also the template for displaying the event in case we want to improve display.
To use just do:
import django_journal django_journal.record('my-tag', '{user} did this to {that}', user=request.user, that=model_instance)
Admin display
admin.JournalModelAdmin recompute messages from the journal message as HTML adding links for filtering by object and to the change admin page for the object if it has one.
Recording error events
If you use transactions you must use error_record() instead of record() and set JOURNAL_DB_FOR_ERROR_ALIAS in your settings to define another db alias to use so that journal record does not happen inside the current transaction.
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
File details
Details for the file django-journal-1.9.0.tar.gz
.
File metadata
- Download URL: django-journal-1.9.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38de5bb5f5be6bc852329ff2674784b8e7b2cf6bfa41d7772f5dbc1e34151400 |
|
MD5 | ee3de10050c7e5cd668340d92a2e7ebb |
|
BLAKE2b-256 | 3c016770e13d9ed15f5853ac05bc19c18a07a20705862bd8788f84fb79fbe54f |