plateforme-corres2math/apps/participation/apps.py

16 lines
617 B
Python
Raw Normal View History

2020-09-21 13:41:55 +00:00
from django.apps import AppConfig
from django.db.models.signals import post_save, pre_delete, pre_save
2020-09-21 13:41:55 +00:00
class ParticipationConfig(AppConfig):
2020-10-30 18:46:46 +00:00
"""
The participation app contains the data about the teams, videos, ...
"""
2020-09-21 13:41:55 +00:00
name = 'participation'
2020-09-24 08:21:50 +00:00
def ready(self):
2020-10-15 18:39:34 +00:00
from participation.signals import create_team_participation, delete_related_videos, update_mailing_list
pre_save.connect(update_mailing_list, "participation.Team")
2020-10-15 18:39:34 +00:00
pre_delete.connect(delete_related_videos, "participation.Participation")
2020-09-24 08:21:50 +00:00
post_save.connect(create_team_participation, "participation.Team")