mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 13:14:28 +03:00
Update so apps load first when using asgi.py
This commit is contained in:
parent
c9744497c9
commit
efbb04da91
|
@ -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":
|
||||
|
|
Loading…
Reference in New Issue
Block a user