Skip to content

Commit

Permalink
Fix asgi.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jennydaman committed Sep 11, 2024
1 parent ecf949e commit c05c884
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions chris_backend/config/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@
import os, sys
sys.path.append(os.path.dirname(os.path.dirname(__file__)))

# get_asgi_application MUST be called before other imports.
# https://github.com/django/channels/issues/1564#issuecomment-722354397
from django.core.asgi import get_asgi_application
django_asgi_app = get_asgi_application()

from core.websockets.urls import websocket_urlpatterns
from core.websockets.auth import TokenQsAuthMiddleware

from channels.routing import ProtocolTypeRouter, URLRouter
from django.core.asgi import get_asgi_application
from channels.security.websocket import AllowedHostsOriginValidator


os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.production')

django_asgi_app = get_asgi_application()

# see https://channels.readthedocs.io/en/3.x/installation.html
application = ProtocolTypeRouter({
Expand Down

0 comments on commit c05c884

Please sign in to comment.