Overhauled entire project config, added notifications, email templates, optimized stripe subscriptions, redis caching, and webdriver utilities

This commit is contained in:
Keannu Christian Bernasol 2024-05-10 23:15:29 +08:00
parent 7cbe8fd720
commit 99dfcef67b
84 changed files with 4300 additions and 867 deletions

View file

@ -0,0 +1,13 @@
from django.dispatch import receiver
from django.db.models.signals import post_save
from notifications.models import Notification
from django.core.cache import cache
# Template for running actions after user have paid for a subscription
@receiver(post_save, sender=Notification)
def clear_cache_after_notification_update(sender, instance, **kwargs):
# Clear cache
cache.delete('notifications')
cache.delete(f'notifications_user:{instance.recipient.id}')