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
|
2020-02-27 14:36:12 +00:00
|
|
|
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 _
|
|
|
|
|
2020-02-27 14:36:12 +00:00
|
|
|
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')
|
2020-02-27 14:36:12 +00:00
|
|
|
|
|
|
|
def ready(self):
|
|
|
|
"""
|
|
|
|
Define app internal signals to interact with other apps
|
|
|
|
"""
|
|
|
|
pre_save.connect(
|
|
|
|
save_user_note,
|
|
|
|
sender=settings.AUTH_USER_MODEL,
|
|
|
|
)
|