Go to file
Emmanuel Cazenave bc58bd50f1 django 2.2: use format_html instead of allow_tags (#54257) 2021-05-25 12:22:47 +02:00
debian debian: stop building the python2 package (#53470) 2021-04-27 15:59:12 +02:00
django_journal django 2.2: use format_html instead of allow_tags (#54257) 2021-05-25 12:22:47 +02: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 build: update to use origin/main 2020-12-26 15:21:16 +01: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 packaging: set django version limits (#53470) 2021-04-27 16:02:32 +02: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 tox: restrict pytest-django version (#54029) 2021-05-17 15:34:35 +02: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.