Skip to content

Commit

Permalink
daphene working
Browse files Browse the repository at this point in the history
  • Loading branch information
George Burton committed May 21, 2024
1 parent 590b4cd commit e72bf9b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions django_app/redbox_app/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
from channels.security.websocket import AllowedHostsOriginValidator
from django.core.asgi import get_asgi_application

from .routing import websocket_urlpatterns

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "redbox_app.settings")
# Initialize Django ASGI application early to ensure the AppRegistry
# is populated before importing code that may import ORM models.
django_asgi_app = get_asgi_application()

# https://github.com/django/daphne/issues/347#issuecomment-733132711
from redbox_app.routing import websocket_urlpatterns # noqa: E402

application = ProtocolTypeRouter(
{
Expand Down

0 comments on commit e72bf9b

Please sign in to comment.