From 254deb21e3748668d53fe4b2260594498eb6dca0 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Fri, 8 Mar 2019 13:48:18 +0300 Subject: [PATCH] read allowed hosts from env --- .idea/codeStyles/Project.xml | 28 ++++++++++++++++++++++++++++ config/settings.py | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .idea/codeStyles/Project.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..3cdc6ae --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/config/settings.py b/config/settings.py index 5d1c082..23dcd55 100644 --- a/config/settings.py +++ b/config/settings.py @@ -14,7 +14,7 @@ if os.path.exists(env_file): SECRET_KEY = '6)mck*tk2eq++!01pr2!7qo7#zf_e(hi_m=-qa4x-ah)lvvt4-' DEBUG = env.bool('DJANGO_DEBUG', True) -ALLOWED_HOSTS = ['0.0.0.0', '127.0.0.1', 'home.bakatrouble.pw', 'localhost', 'bots.bakatrouble.pw'] +ALLOWED_HOSTS = env.list('DJANGO_ALLOWED_HOSTS', []) INSTALLED_APPS = [ 'django_extensions',