Go to file
Christophe Siraut 3e15a8f706 debian: set pybuild name 2020-05-05 09:33:54 +02:00
debian debian: set pybuild name 2020-05-05 09:33:54 +02:00
django_journal add python3 support (#40614) 2020-03-10 15:10:36 +01:00
tests add python3 support (#40614) 2020-03-10 15:10:36 +01:00
.gitignore first commit of django-journal 1.0 2012-12-10 14:27:15 +01:00
Jenkinsfile jenkins: build default dist (#42458) 2020-05-04 16:26:52 +02:00
MANIFEST.in packaging: write version in VERSION file (#34881) 2019-07-15 18:10:08 +02:00
README.rst first commit of django-journal 1.0 2012-12-10 14:27:15 +01:00
setup.py remove django-model-utils dependency (#40616) 2020-03-10 15:04:13 +01:00
test_settings.py prevent inconsistent use of db alias (#36028) 2019-09-12 10:58:27 +02:00
test_urls.py setup.py: add command to run tests 2013-09-06 15:02:19 +02:00
tox.ini add python3 support (#40614) 2020-03-10 15:10:36 +01:00

README.rst

Journal application
===================

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.