From 6dba3dc1dcad00cba73bad14ff497806ca7c32f9 Mon Sep 17 00:00:00 2001
From: Michal Cyprian <michal@platform.sh>
Date: Mon, 5 Nov 2018 12:10:51 +0100
Subject: [PATCH] Small settings changes to make local development smooth

---
 myapp/settings.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/myapp/settings.py b/myapp/settings.py
index accdd9d..34d2f26 100644
--- a/myapp/settings.py
+++ b/myapp/settings.py
@@ -28,7 +28,7 @@ SECRET_KEY = '5^#15wdl(qll2ue&&(-1ixwalo7%td1a(&x7abp(roabe_mk7w'
 # SECURITY WARNING: don't run with debug turned on in production!
 DEBUG = True
 
-ALLOWED_HOSTS = ['localhost']
+ALLOWED_HOSTS = ['*']
 
 
 # Application definition
@@ -40,6 +40,7 @@ INSTALLED_APPS = [
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
+    'hello',
 ]
 
 MIDDLEWARE = [
@@ -57,7 +58,7 @@ ROOT_URLCONF = 'myapp.urls'
 TEMPLATES = [
     {
         'BACKEND': 'django.template.backends.django.DjangoTemplates',
-        'DIRS': [os.path.join(BASE_DIR, 'hello/templates')],
+        'DIRS': [],
         'APP_DIRS': True,
         'OPTIONS': {
             'context_processors': [
@@ -124,7 +125,9 @@ STATIC_URL = '/static/'
 
 # Import some Platform.sh settings from the environment.
 
-STATIC_ROOT = os.path.join(os.getenv('PLATFORM_APP_DIR'), 'static')
+app_dir = os.getenv('PLATFORM_APP_DIR')
+if app_dir:
+    STATIC_ROOT = os.path.join(app_dir, 'static')
 
 entropy = os.getenv('PLATFORM_PROJECT_ENTROPY')
 if entropy:
-- 
GitLab