* fixup labels and help_text for the email field * add email and published columns to speaker proposal table, add published column to event proposal table * send email to user when a speaker or eventproposal is accepted or rejected. Send email to submitter and all speakers when an eventinstance is created, or when the time is updated (event is rescheduled). Fix a few other small things while here.
25 lines
777 B
Python
25 lines
777 B
Python
from django.apps import AppConfig
|
|
from django.db.models.signals import m2m_changed, post_save, pre_save
|
|
|
|
|
|
class ProgramConfig(AppConfig):
|
|
name = "program"
|
|
|
|
def ready(self):
|
|
from .models import Speaker, EventInstance
|
|
from .signal_handlers import (
|
|
check_speaker_event_camp_consistency,
|
|
check_speaker_camp_change,
|
|
eventinstance_pre_save,
|
|
eventinstance_post_save,
|
|
)
|
|
|
|
m2m_changed.connect(
|
|
check_speaker_event_camp_consistency, sender=Speaker.events.through
|
|
)
|
|
|
|
pre_save.connect(check_speaker_camp_change, sender=Speaker)
|
|
pre_save.connect(eventinstance_pre_save, sender=EventInstance)
|
|
|
|
post_save.connect(eventinstance_post_save, sender=EventInstance)
|