endpoint /api/ws/telemtry with auth, broadcast, db

This commit is contained in:
aa.afanasyev 2025-08-03 04:11:56 +09:00
parent 576db57d99
commit f7b592f4b9
7 changed files with 116 additions and 24 deletions

View file

@ -104,7 +104,7 @@ ASGI_APPLICATION = 'testapi.asgi.application'
# Database
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
if not PRODUCTION:
if PRODUCTION:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
@ -195,3 +195,11 @@ SESSION_COOKIE_SECURE = False
CSRF_TRUSTED_ORIGINS = os.getenv('CSRF_TRUSTED_ORIGINS', 'http://localhost:5173, http://localhost:8000').split(',')
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
"CONFIG": {
"hosts": [("redis", 6379)],
},
},
}