1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-02-06 13:33:00 +00:00

24 lines
972 B
Python
Raw Normal View History

2020-12-26 21:26:26 +01:00
# Copyright (C) 2020 by Animath
# SPDX-License-Identifier: GPL-3.0-or-later
2020-09-21 15:41:55 +02:00
from django.apps import AppConfig
from django.db.models.signals import post_save, pre_save
2020-09-21 15:41:55 +02:00
class RegistrationConfig(AppConfig):
2020-10-30 19:46:46 +01:00
"""
Registration app contains the detail about users only.
"""
2020-09-21 15:41:55 +02:00
name = 'registration'
2020-09-22 12:27:03 +02:00
def ready(self):
from registration.signals import create_admin_registration, invite_to_public_rooms, \
set_username, send_email_link
2020-09-22 12:27:03 +02:00
pre_save.connect(set_username, "auth.User")
2020-09-22 19:37:37 +02:00
pre_save.connect(send_email_link, "auth.User")
2020-09-22 12:27:03 +02:00
post_save.connect(create_admin_registration, "auth.User")
post_save.connect(invite_to_public_rooms, "registration.Registration")
post_save.connect(invite_to_public_rooms, "registration.StudentRegistration")
post_save.connect(invite_to_public_rooms, "registration.CoachRegistration")
post_save.connect(invite_to_public_rooms, "registration.AdminRegistration")