nk20/apps/member/apps.py

24 lines
611 B
Python
Raw Permalink Normal View History

# 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
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 _
from .signals import save_user_profile
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
"""
2020-02-27 14:41:15 +00:00
post_save.connect(
save_user_profile,
sender=settings.AUTH_USER_MODEL,
)