2021-06-14 19:45:36 +00:00
|
|
|
# Copyright (C) 2018-2021 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
|
2020-02-27 14:41:15 +00:00
|
|
|
from django.db.models.signals import post_save
|
2019-07-08 11:59:31 +00:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
|
2020-02-27 15:25:18 +00:00
|
|
|
from .signals import save_user_profile
|
2020-02-27 14:36:12 +00:00
|
|
|
|
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
|
|
|
|
"""
|
2020-02-27 14:41:15 +00:00
|
|
|
post_save.connect(
|
2020-02-27 15:25:18 +00:00
|
|
|
save_user_profile,
|
2020-02-27 14:36:12 +00:00
|
|
|
sender=settings.AUTH_USER_MODEL,
|
|
|
|
)
|