first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 22:23:47 +03:00
commit 3de0ca1fb5
167 changed files with 5068 additions and 0 deletions

11
settings/signals.py Normal file
View File

@@ -0,0 +1,11 @@
from django.db.models.signals import post_save, post_delete
from django.dispatch import receiver
from settings.models import Setting
from django.core.cache import cache
@receiver([post_save, post_delete], sender=Setting)
def invalidate_setting_cache(sender, instance, **kwargs):
# Sadece active_setting cache'ini temizle
cache.delete('active_setting')
print('Cache cleared for active_setting')