mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
Use signals to update internal ics
This commit is contained in:
9
com/signals.py
Normal file
9
com/signals.py
Normal file
@ -0,0 +1,9 @@
|
||||
from django.db.models.base import post_save
|
||||
from django.dispatch import receiver
|
||||
|
||||
from com.models import IcsCalendar, News
|
||||
|
||||
|
||||
@receiver(post_save, sender=News, dispatch_uid="update_internal_ics")
|
||||
def update_internal_ics(*args, **kwargs):
|
||||
_ = IcsCalendar.make_internal()
|
Reference in New Issue
Block a user