1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-11-27 00:07:11 +00:00
plateforme-tfjm2/apps/registration/apps.py

24 lines
932 B
Python
Raw Normal View History

2020-12-27 10:49:54 +00:00
# Copyright (C) 2020 by Animath
# SPDX-License-Identifier: GPL-3.0-or-later
from django.apps import AppConfig
from django.db.models.signals import post_save, pre_save
class RegistrationConfig(AppConfig):
"""
Registration app contains the detail about users only.
"""
name = 'registration'
def ready(self):
2021-01-18 17:13:58 +00:00
from registration.signals import create_admin_registration, create_payment, \
2020-12-27 10:49:54 +00:00
set_username, send_email_link
pre_save.connect(set_username, "auth.User")
pre_save.connect(send_email_link, "auth.User")
post_save.connect(create_admin_registration, "auth.User")
2021-01-18 17:13:58 +00:00
post_save.connect(create_payment, "registration.Registration")
post_save.connect(create_payment, "registration.StudentRegistration")
post_save.connect(create_payment, "registration.CoachRegistration")
post_save.connect(create_payment, "registration.AdminRegistration")