Load home page

This commit is contained in:
Andros Fenollosa
2021-11-12 18:59:01 +01:00
parent 35e173697b
commit 04b1e5bf6c
8 changed files with 108 additions and 11 deletions

View File

@ -6,11 +6,21 @@ It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "event.settings")
import django
application = get_asgi_application()
django.setup()
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
from django.core.asgi import get_asgi_application
from app.website.routing import websocket_urlpatterns
application = ProtocolTypeRouter(
{
"websocket": AuthMiddlewareStack(URLRouter(websocket_urlpatterns)),
}
)