예제 #1
0
    def ready(self):
        from openwisp_notifications.signals import notify  # noqa
        from openwisp_notifications.handlers import notify_handler

        notify.connect(
            notify_handler, dispatch_uid='openwisp_notifications.model.notifications'
        )
예제 #2
0
    def ready(self):
        from openwisp_notifications.handlers import notify_handler
        from openwisp_notifications.signals import notify

        notify.connect(
            notify_handler,
            dispatch_uid='openwisp_notifications.model.notifications')

        # Add CORS configuration checks
        from openwisp_notifications.checks import check_cors_configuration  # noqa
예제 #3
0
    def ready(self):
        from openwisp_notifications.handlers import (
            notification_type_registered_unregistered_handler,
            notify_handler,
        )
        from openwisp_notifications.signals import notify

        notify.connect(
            notify_handler, dispatch_uid='openwisp_notifications.model.notifications'
        )
        if app_settings.POPULATE_PREFERENCES_ON_MIGRATE:
            post_migrate.connect(
                notification_type_registered_unregistered_handler,
                sender=self,
                dispatch_uid='register_unregister_notification_types',
            )

        # Add CORS configuration checks
        from openwisp_notifications.checks import check_cors_configuration  # noqa