Sith/com/signals.py

11 lines
328 B
Python
Raw Normal View History

from django.db.models.signals import post_delete, post_save
2025-01-03 12:56:40 +00:00
from django.dispatch import receiver
2025-01-04 17:57:31 +00:00
from com.calendar import IcsCalendar
from com.models import News
2025-01-03 12:56:40 +00:00
@receiver([post_save, post_delete], sender=News, dispatch_uid="update_internal_ics")
2025-01-03 12:56:40 +00:00
def update_internal_ics(*args, **kwargs):
_ = IcsCalendar.make_internal()