Improved documentation

This commit is contained in:
Raphael Michel
2016-08-03 09:43:11 +02:00
parent 221ce9f0ae
commit 01fff14152

View File

@@ -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)