mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-26 06:22:22 +00:00
Don't import models too soon
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
7855ec2225
commit
3717cd8b3f
@ -17,13 +17,15 @@ from channels.routing import ProtocolTypeRouter, URLRouter
|
|||||||
from channels.security.websocket import AllowedHostsOriginValidator
|
from channels.security.websocket import AllowedHostsOriginValidator
|
||||||
from django.core.asgi import get_asgi_application
|
from django.core.asgi import get_asgi_application
|
||||||
|
|
||||||
import draw.routing
|
|
||||||
|
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tfjm.settings')
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tfjm.settings')
|
||||||
|
|
||||||
|
django_asgi_app = get_asgi_application()
|
||||||
|
|
||||||
|
import draw.routing
|
||||||
|
|
||||||
application = ProtocolTypeRouter(
|
application = ProtocolTypeRouter(
|
||||||
{
|
{
|
||||||
"http": get_asgi_application(),
|
"http": django_asgi_app,
|
||||||
"websocket": AllowedHostsOriginValidator(
|
"websocket": AllowedHostsOriginValidator(
|
||||||
AuthMiddlewareStack(URLRouter(draw.routing.websocket_urlpatterns))
|
AuthMiddlewareStack(URLRouter(draw.routing.websocket_urlpatterns))
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user