nk20/apps/logs/apps.py

19 lines
578 B
Python
Raw Permalink Normal View History

# Copyright (C) 2018-2021 by BDE ENS Paris-Saclay
2020-02-24 17:18:44 +00:00
# SPDX-License-Identifier: GPL-3.0-or-later
from django.apps import AppConfig
2020-03-11 16:20:16 +00:00
from django.db.models.signals import pre_save, post_save, post_delete
2020-02-24 17:18:44 +00:00
from django.utils.translation import gettext_lazy as _
class LogsConfig(AppConfig):
name = 'logs'
verbose_name = _('Logs')
def ready(self):
# noinspection PyUnresolvedReferences
2020-03-11 16:20:16 +00:00
from . import signals
pre_save.connect(signals.pre_save_object)
post_save.connect(signals.save_object)
post_delete.connect(signals.delete_object)