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