mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-10-31 22:24:30 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			741 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			741 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # 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
 | |
| from django.utils.translation import gettext_lazy as _
 | |
| 
 | |
| 
 | |
| class RegistrationConfig(AppConfig):
 | |
|     """
 | |
|     Registration app contains the detail about users only.
 | |
|     """
 | |
|     name = 'registration'
 | |
|     verbose_name = _("registrations")
 | |
| 
 | |
|     def ready(self):
 | |
|         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')
 |