2020-09-21 13:41:55 +00:00
|
|
|
from django.apps import AppConfig
|
2020-10-15 15:20:58 +00:00
|
|
|
from django.db.models.signals import post_save, pre_delete, pre_save
|
2020-09-21 13:41:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ParticipationConfig(AppConfig):
|
|
|
|
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
|
2020-10-11 15:10:59 +00:00
|
|
|
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")
|