Add banner style.
[wolnelektury.git] / src / annoy / signals.py
1 from django.db.models.signals import post_save, post_delete
2 from django.dispatch import receiver
3 import club.models
4 from . import models
5
6
7 @receiver(post_delete, sender=models.MediaInsertText)
8 @receiver(post_save, sender=models.MediaInsertText)
9 def update_etag(sender, instance, **kwargs):
10     instance.media_insert_set.update_etag()
11
12
13 @receiver(post_save, sender=club.models.Schedule)
14 def update_progress(sender, instance, **kwargs):
15     try:
16         models.Banner.update_all_progress()
17     except:
18         pass