From 6e456ac3960b4968fa65700a242811880ee2b0d6 Mon Sep 17 00:00:00 2001 From: Jaehun You Date: Thu, 21 Nov 2024 13:46:33 +0900 Subject: [PATCH] Install `channels` package See also: #17 --- requirements.txt | 1 + wlm_server/wlm_server/settings.py | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 33beae0..ecc1054 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,6 @@ pylint==3.3.* pylint-django==2.6.* djangorestframework==3.15.* psycopg==3.2.* +channels==4.2.* pylablib==1.4.* camel-converter==4.0.* diff --git a/wlm_server/wlm_server/settings.py b/wlm_server/wlm_server/settings.py index ce02725..991a3a4 100644 --- a/wlm_server/wlm_server/settings.py +++ b/wlm_server/wlm_server/settings.py @@ -35,6 +35,7 @@ # Application definition INSTALLED_APPS = [ + 'channels', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -82,7 +83,15 @@ }, ] -WSGI_APPLICATION = 'wlm_server.wsgi.application' +ASGI_APPLICATION = 'wlm_server.asgi.application' + +CHANNEL_LAYERS = { + 'default': { + 'BACKEND': 'channels.layers.InMemoryChannelLayer', + }, +} + +AUTH_USER_MODEL = 'user.User' # Database @@ -140,7 +149,8 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' -AUTH_USER_MODEL = 'user.User' + +# Global variables MESSAGE_QUEUE = MessageQueue()