bornhack-website/src/program/apps.py
Thomas Steen Rasmussen 0ff37bbca5 move code to src/ folder
2017-01-30 12:06:49 +01:00

13 lines
464 B
Python

from django.apps import AppConfig
from django.db.models.signals import m2m_changed, pre_save
from .signal_handlers import check_speaker_event_camp_consistency, check_speaker_camp_change
class ProgramConfig(AppConfig):
name = 'program'
def ready(self):
from .models import Speaker
m2m_changed.connect(check_speaker_event_camp_consistency, sender=Speaker.events.through)
pre_save.connect(check_speaker_camp_change, sender=Speaker)