From f341decaebacbb29ed2fc75dc72ee673dca2133a Mon Sep 17 00:00:00 2001 From: David Lyle Date: Mon, 13 Jul 2015 11:40:32 -0600 Subject: [PATCH] Allow STATIC_ROOT override STATIC_ROOT is a file system location. It does not need to be tied to WEBROOT. Change-Id: I4935c5d8bd883cb5f091af22582e942f13aa5100 Partial-Bug: #1399585 --- openstack_dashboard/settings.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openstack_dashboard/settings.py b/openstack_dashboard/settings.py index 81860a2ab4..113f7f9220 100644 --- a/openstack_dashboard/settings.py +++ b/openstack_dashboard/settings.py @@ -46,7 +46,7 @@ WEBROOT = '/' LOGIN_URL = None LOGOUT_URL = None LOGIN_REDIRECT_URL = None - +STATIC_ROOT = None ROOT_URLCONF = 'openstack_dashboard.urls' @@ -278,7 +278,10 @@ if LOGIN_REDIRECT_URL is None: MEDIA_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'media')) MEDIA_URL = WEBROOT + 'media/' -STATIC_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'static')) + +if STATIC_ROOT is None: + STATIC_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'static')) + STATIC_URL = WEBROOT + 'static/' STATICFILES_DIRS = get_staticfiles_dirs(WEBROOT)