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):
|
2024-02-24 22:05:21 +00:00
|
|
|
from registration import signals
|
|
|
|
pre_save.connect(signals.set_username, 'auth.User')
|
|
|
|
pre_save.connect(signals.send_email_link, 'auth.User')
|
|
|
|
pre_save.connect(signals.update_payment_amount, 'registration.Payment')
|
|
|
|
post_save.connect(signals.create_admin_registration, 'auth.User')
|