From b29536a84abc6bd4267ea49d9e496d04b4a7ad07 Mon Sep 17 00:00:00 2001 From: Andros Fenollosa Date: Wed, 18 Nov 2020 00:32:49 +0100 Subject: [PATCH] Update settings.py --- mi_web/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mi_web/settings.py b/mi_web/settings.py index c8eea64..aba53a8 100644 --- a/mi_web/settings.py +++ b/mi_web/settings.py @@ -9,7 +9,7 @@ https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ - +import os from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. @@ -127,7 +127,7 @@ CHANNEL_LAYERS = { "default": { "BACKEND": "channels_redis.core.RedisChannelLayer", "CONFIG": { - "hosts": [("127.0.0.1", 6379)], + "hosts": [(os.environ.get("REDIS_URL", "127.0.0.1"), 6379)], }, }, }