1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 19:02:33 +00:00

Don't import models too soon

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2023-03-28 20:24:42 +02:00
parent 7855ec2225
commit 3717cd8b3f
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -17,13 +17,15 @@ from channels.routing import ProtocolTypeRouter, URLRouter
from channels.security.websocket import AllowedHostsOriginValidator
from django.core.asgi import get_asgi_application
import draw.routing
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tfjm.settings')
django_asgi_app = get_asgi_application()
import draw.routing
application = ProtocolTypeRouter(
{
"http": get_asgi_application(),
"http": django_asgi_app,
"websocket": AllowedHostsOriginValidator(
AuthMiddlewareStack(URLRouter(draw.routing.websocket_urlpatterns))
),