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 django.core.asgi import get_asgi_application
|
||||||
|
|
||||||
from .websocket import websocket_application
|
|
||||||
|
|
||||||
# This allows easy placement of apps within the interior
|
# This allows easy placement of apps within the interior
|
||||||
# {{ cookiecutter.project_slug }} directory.
|
# {{ cookiecutter.project_slug }} directory.
|
||||||
app_path = Path(__file__).parents[1].resolve()
|
app_path = Path(__file__).parents[1].resolve()
|
||||||
|
@ -32,6 +30,9 @@ django_application = get_asgi_application()
|
||||||
# from helloworld.asgi import HelloWorldApplication
|
# from helloworld.asgi import HelloWorldApplication
|
||||||
# application = HelloWorldApplication(application)
|
# application = HelloWorldApplication(application)
|
||||||
|
|
||||||
|
# Importing websocket application so that apps are loaded first
|
||||||
|
from .websocket import websocket_application # noqa
|
||||||
|
|
||||||
|
|
||||||
async def application(scope, receive, send):
|
async def application(scope, receive, send):
|
||||||
if scope["type"] == "http":
|
if scope["type"] == "http":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user