mirror of
https://github.com/pretix/pretix.git
synced 2026-05-26 18:43:59 +00:00
Improved documentation
This commit is contained in:
@@ -7,7 +7,7 @@ in the system that lead to the current state.
|
|||||||
Logging changes
|
Logging changes
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
We log data changes to the database in a format that makes it mossible to display those logs to a human, if
|
We log data changes to the database in a format that makes it possible to display those logs to a human, if
|
||||||
required. pretix stores all those logs centrally in a model called :py:class:`pretix.base.models.LogEntry`.
|
required. pretix stores all those logs centrally in a model called :py:class:`pretix.base.models.LogEntry`.
|
||||||
We recommend all relevant models to inherit from ``LoggedModel`` as it simplifies creating new log entries:
|
We recommend all relevant models to inherit from ``LoggedModel`` as it simplifies creating new log entries:
|
||||||
|
|
||||||
@@ -67,6 +67,7 @@ We now need a way to translate the action codes like ``pretix.event.changed`` in
|
|||||||
strings. The :py:attr:`pretix.base.signals.logentry_display` signals allows you to do so. A simple
|
strings. The :py:attr:`pretix.base.signals.logentry_display` signals allows you to do so. A simple
|
||||||
implementation could look like::
|
implementation could look like::
|
||||||
|
|
||||||
|
from django.utils.translation import ugettext as _
|
||||||
from pretix.base.signals import logentry_display
|
from pretix.base.signals import logentry_display
|
||||||
|
|
||||||
@receiver(signal=logentry_display)
|
@receiver(signal=logentry_display)
|
||||||
|
|||||||
Reference in New Issue
Block a user