13 lines
464 B
Python
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)
|
|
|