fixes, orval, downloader functioning again

This commit is contained in:
2026-04-21 00:47:10 +02:00
parent 659999f4fd
commit cf08dbaf15
93 changed files with 1662 additions and 1333 deletions

View File

@@ -8,18 +8,24 @@ https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/
"""
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'vontor_cz.settings')
from django.core.asgi import get_asgi_application
# Initialize Django app registry before importing any models/routing.
django_asgi_app = get_asgi_application()
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
import social.chat.routing
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'vontor_cz.settings')
from thirdparty.downloader.routing import websocket_urlpatterns as downloader_ws
application = ProtocolTypeRouter({
"http": get_asgi_application(),
"http": django_asgi_app,
"websocket": AuthMiddlewareStack(
URLRouter(
social.chat.routing.websocket_urlpatterns
downloader_ws + social.chat.routing.websocket_urlpatterns
)
),
})