diff --git a/myapp/settings.py b/myapp/settings.py index accdd9d765ff131b8a51174c51d1a3dc79501137..34d2f264f0eee14e34b275a0154383ea023aaf2a 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: