feat: websockets
This commit is contained in:
@@ -23,6 +23,7 @@ if not DEBUG:
|
||||
|
||||
|
||||
DJANGO_APPS = [
|
||||
'daphne', # antes de staticfiles: hace que runserver sirva HTTP y WS
|
||||
'unfold', # before django.contrib.admin
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
@@ -33,6 +34,7 @@ DJANGO_APPS = [
|
||||
]
|
||||
|
||||
THIRD_PARTY_APPS = [
|
||||
'channels',
|
||||
'corsheaders',
|
||||
'django_extensions',
|
||||
'django_filters',
|
||||
@@ -88,6 +90,16 @@ TEMPLATES = [
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'config.wsgi.application'
|
||||
ASGI_APPLICATION = 'config.asgi.application'
|
||||
|
||||
# Channels usa el mismo Redis que ya sirve de broker de Celery (ver
|
||||
# REDIS_HOST/REDIS_PORT en config/settings/environ.py).
|
||||
CHANNEL_LAYERS = {
|
||||
'default': {
|
||||
'BACKEND': 'channels_redis.core.RedisChannelLayer',
|
||||
'CONFIG': {'hosts': [(REDIS_HOST, int(REDIS_PORT))]},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
# Database
|
||||
|
||||
Reference in New Issue
Block a user