28 lines
674 B
Python
28 lines
674 B
Python
from django.apps import AppConfig
|
|
|
|
__all__ = [
|
|
"NotifyConfig",
|
|
]
|
|
|
|
|
|
class NotifyConfig(AppConfig):
|
|
default_auto_field = "django.db.models.BigAutoField"
|
|
name = "notify"
|
|
verbose_name = "Notifications"
|
|
|
|
def ready(self):
|
|
from django.db.models.signals import post_migrate
|
|
|
|
from notify.delivery.providers import register_builtin_providers
|
|
from notify.registry import sync_on_migrate
|
|
|
|
register_builtin_providers()
|
|
import notify.receivers # noqa: F401
|
|
|
|
post_migrate.connect(
|
|
sync_on_migrate,
|
|
sender=self,
|
|
weak=False,
|
|
dispatch_uid="notify.sync_registered",
|
|
)
|