1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-26 05:42:22 +00:00
plateforme-tfjm2/participation/apps.py
Emmy D'Anello 6e35bdc0b3
Create payments in a signal rather than in a view
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
2024-02-24 09:39:04 +01:00

21 lines
775 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
class ParticipationConfig(AppConfig):
"""
The participation app contains the data about the teams, solutions, ...
"""
name = 'participation'
def ready(self):
from participation import signals
pre_save.connect(signals.update_mailing_list, "participation.Team")
post_save.connect(signals.create_team_participation, "participation.Team")
post_save.connect(signals.create_payments, "participation.Participation")
post_save.connect(signals.create_notes, "participation.Passage")
post_save.connect(signals.create_notes, "participation.Pool")