from django.apps import AppConfig from django.db.models.signals import pre_save class LeftistsConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'leftists' def ready(self): from . import signals from .models import ShortLink pre_save.connect(signals.rmcache, sender=ShortLink)