From efbb04da9155d1e45885d5c925c2b26ad3a9cf7f Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:32:17 -0400 Subject: [PATCH] Update so apps load first when using asgi.py --- {{cookiecutter.project_slug}}/config/asgi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/asgi.py b/{{cookiecutter.project_slug}}/config/asgi.py index 4cc878ca..a325839b 100644 --- a/{{cookiecutter.project_slug}}/config/asgi.py +++ b/{{cookiecutter.project_slug}}/config/asgi.py @@ -12,8 +12,6 @@ from pathlib import Path from django.core.asgi import get_asgi_application -from .websocket import websocket_application - # This allows easy placement of apps within the interior # {{ cookiecutter.project_slug }} directory. app_path = Path(__file__).parents[1].resolve() @@ -32,6 +30,9 @@ django_application = get_asgi_application() # from helloworld.asgi import HelloWorldApplication # application = HelloWorldApplication(application) +# Importing websocket application so that apps are loaded first +from .websocket import websocket_application # noqa + async def application(scope, receive, send): if scope["type"] == "http":