Skip to content

apps

django_spire.notification.apps

NotificationConfig

Bases: AppConfig

default_auto_field = 'django.db.models.BigAutoField' class-attribute instance-attribute

name = 'django_spire.notification' class-attribute instance-attribute

label = 'django_spire_notification' class-attribute instance-attribute

REQUIRED_APPS = ('django_spire_core', 'django_spire_history', 'django_spire_history_viewed') class-attribute instance-attribute

URLPATTERNS_INCLUDE = 'django_spire.notification.urls' class-attribute instance-attribute

URLPATTERNS_NAMESPACE = 'notification' class-attribute instance-attribute

ready

Source code in django_spire/notification/apps.py
def ready(self) -> None:
    if not isinstance(getattr(settings, NOTIFICATION_THROTTLE_RATE_PER_MINUTE_SETTINGS_NAME), int):
        raise ValueError(f'"{NOTIFICATION_THROTTLE_RATE_PER_MINUTE_SETTINGS_NAME}" must be set in the django settings when using "{self.label}".')

    check_required_apps(self.label)