mirror of
https://github.com/deunix-educ/Fail2banMqttActionBanishment.git
synced 2026-08-24 03:11:58 +02:00
17 lines
495 B
Python
17 lines
495 B
Python
"""ASGI config: sert le HTTP classique (Django) et les WebSockets (Channels)."""
|
|
import os
|
|
|
|
import django
|
|
from channels.routing import ProtocolTypeRouter, URLRouter
|
|
from django.core.asgi import get_asgi_application
|
|
|
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.dev')
|
|
django.setup()
|
|
|
|
from banevents.routing import websocket_urlpatterns # noqa: E402
|
|
|
|
application = ProtocolTypeRouter({
|
|
'http': get_asgi_application(),
|
|
'websocket': URLRouter(websocket_urlpatterns),
|
|
})
|