nk20/apps/member/apps.py

24 lines
603 B
Python
Raw Normal View History

2020-02-18 20:30:26 +00:00
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
2019-07-08 11:59:31 +00:00
# SPDX-License-Identifier: GPL-3.0-or-later
from django.apps import AppConfig
from django.conf import settings
from django.db.models.signals import pre_save
2019-07-08 11:59:31 +00:00
from django.utils.translation import gettext_lazy as _
from .signals import save_user_note
2019-07-08 11:59:31 +00:00
2019-07-16 10:43:23 +00:00
class MemberConfig(AppConfig):
name = 'member'
verbose_name = _('member')
def ready(self):
"""
Define app internal signals to interact with other apps
"""
pre_save.connect(
save_user_note,
sender=settings.AUTH_USER_MODEL,
)