67 lines
2.4 KiB
Diff
67 lines
2.4 KiB
Diff
From 4d90b94a0a4ce3e7e69507c2c25a6981336c66a1 Mon Sep 17 00:00:00 2001
|
|
From: Pete Vander Giessen <pete.vandergiessen@canonical.com>
|
|
Date: Thu, 19 Sep 2019 13:18:50 +0000
|
|
Subject: [PATCH] Added SNAP_COMMON pathing
|
|
|
|
---
|
|
lib/python3.6/site-packages/openstack_dashboard/local/local_settings.py | 4 +++-
|
|
openstack_dashboard/settings.py | 6 ++++--
|
|
2 files changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/lib/python3.6/site-packages/openstack_dashboard/local/local_settings.py b/lib/python3.6/site-packages/openstack_dashboard/local/local_settings.py
|
|
index 5f1ab10cc..cef4e9485 100644
|
|
--- a/lib/python3.6/site-packages/openstack_dashboard/local/local_settings.py
|
|
+++ b/lib/python3.6/site-packages/openstack_dashboard/local/local_settings.py
|
|
@@ -10,6 +10,8 @@ from openstack_dashboard.settings import HORIZON_CONFIG
|
|
|
|
DEBUG = True
|
|
|
|
+SNAP_COMMON = os.environ['SNAP_COMMON']
|
|
+
|
|
# This setting controls whether or not compression is enabled. Disabling
|
|
# compression makes Horizon considerably slower, but makes it much easier
|
|
# to debug JS and CSS changes
|
|
@@ -62,7 +64,7 @@ DEBUG = True
|
|
# including on the login form.
|
|
#HORIZON_CONFIG["disable_password_reveal"] = False
|
|
|
|
-LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
|
|
+LOCAL_PATH = "{}/etc/horizon".format(SNAP_COMMON)
|
|
|
|
# Set custom secret key:
|
|
# You can either set it to a specific value or you can let horizon generate a
|
|
diff --git a/openstack_dashboard/settings.py b/openstack_dashboard/settings.py
|
|
index 02cd17ef3..69380f460 100644
|
|
--- a/lib/python3.6/site-packages/openstack_dashboard/settings.py
|
|
+++ b/lib/python3.6/site-packages/openstack_dashboard/settings.py
|
|
@@ -55,6 +55,8 @@ if ROOT_PATH not in sys.path:
|
|
|
|
DEBUG = False
|
|
|
|
+SNAP_COMMON = os.environ['SNAP_COMMON']
|
|
+
|
|
ROOT_URLCONF = 'openstack_dashboard.urls'
|
|
|
|
HORIZON_CONFIG = {
|
|
@@ -216,7 +218,7 @@ USE_TZ = True
|
|
DEFAULT_EXCEPTION_REPORTER_FILTER = 'horizon.exceptions.HorizonReporterFilter'
|
|
|
|
SECRET_KEY = None
|
|
-LOCAL_PATH = None
|
|
+LOCAL_PATH = "{}/etc/horizon".format(SNAP_COMMON)
|
|
|
|
ADD_INSTALLED_APPS = []
|
|
|
|
@@ -265,7 +267,7 @@ else:
|
|
)
|
|
|
|
# allow to drop settings snippets into a local_settings_dir
|
|
-LOCAL_SETTINGS_DIR_PATH = os.path.join(ROOT_PATH, "local", "local_settings.d")
|
|
+LOCAL_SETTINGS_DIR_PATH = os.path.join(LOCAL_PATH, "local_settings.d")
|
|
if os.path.exists(LOCAL_SETTINGS_DIR_PATH):
|
|
for (dirpath, dirnames, filenames) in os.walk(LOCAL_SETTINGS_DIR_PATH):
|
|
for filename in sorted(filenames):
|
|
--
|
|
2.17.1
|
|
|