forget push file
This commit is contained in:
parent
7b6a8ba57b
commit
2a468bcb82
@ -7,3 +7,4 @@ install==1.3.5
|
||||
pytz==2023.3.post1
|
||||
sqlparse==0.4.4
|
||||
channels==3.0.5
|
||||
daphne
|
||||
|
@ -8,9 +8,20 @@ https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
from channels.routing import ProtocolTypeRouter, URLRouter
|
||||
from channels.auth import AuthMiddlewareStack
|
||||
import frontend.routing
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'trancendence.settings')
|
||||
|
||||
application = get_asgi_application()
|
||||
application = ProtocolTypeRouter({
|
||||
'http':get_asgi_application(),
|
||||
'websocket':AuthMiddlewareStack(
|
||||
URLRouter(
|
||||
frontend.routing.websocket_urlpatterns
|
||||
)
|
||||
)
|
||||
})
|
||||
|
||||
|
@ -38,6 +38,9 @@ CORS_ORIGIN_WHITELIST = (
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'channels',
|
||||
'daphne',
|
||||
|
||||
'accounts.apps.AccountsConfig',
|
||||
'profiles.apps.ProfilesConfig',
|
||||
'frontend.apps.FrontendConfig',
|
||||
@ -52,6 +55,14 @@ INSTALLED_APPS = [
|
||||
'django.contrib.staticfiles',
|
||||
]
|
||||
|
||||
ASGI_APPLICATION = 'trancendence.asgi.application'
|
||||
|
||||
CHANNEL_LAYERS = {
|
||||
'default' :{
|
||||
'BACKEND':'channels.layers.InMemoryChannelLayer'
|
||||
}
|
||||
}
|
||||
|
||||
MIDDLEWARE = [
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
|
Loading…
Reference in New Issue
Block a user