OpenStack in a snap!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

67 lines
2.4 KiB

  1. From 4d90b94a0a4ce3e7e69507c2c25a6981336c66a1 Mon Sep 17 00:00:00 2001
  2. From: Pete Vander Giessen <pete.vandergiessen@canonical.com>
  3. Date: Thu, 19 Sep 2019 13:18:50 +0000
  4. Subject: [PATCH] Added SNAP_COMMON pathing
  5. ---
  6. lib/python3.6/site-packages/openstack_dashboard/local/local_settings.py | 4 +++-
  7. openstack_dashboard/settings.py | 6 ++++--
  8. 2 files changed, 7 insertions(+), 3 deletions(-)
  9. 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
  10. index 5f1ab10cc..cef4e9485 100644
  11. --- a/lib/python3.6/site-packages/openstack_dashboard/local/local_settings.py
  12. +++ b/lib/python3.6/site-packages/openstack_dashboard/local/local_settings.py
  13. @@ -10,6 +10,8 @@ from openstack_dashboard.settings import HORIZON_CONFIG
  14. DEBUG = True
  15. +SNAP_COMMON = os.environ['SNAP_COMMON']
  16. +
  17. # This setting controls whether or not compression is enabled. Disabling
  18. # compression makes Horizon considerably slower, but makes it much easier
  19. # to debug JS and CSS changes
  20. @@ -62,7 +64,7 @@ DEBUG = True
  21. # including on the login form.
  22. #HORIZON_CONFIG["disable_password_reveal"] = False
  23. -LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
  24. +LOCAL_PATH = "{}/etc/horizon".format(SNAP_COMMON)
  25. # Set custom secret key:
  26. # You can either set it to a specific value or you can let horizon generate a
  27. diff --git a/openstack_dashboard/settings.py b/openstack_dashboard/settings.py
  28. index 02cd17ef3..69380f460 100644
  29. --- a/lib/python3.6/site-packages/openstack_dashboard/settings.py
  30. +++ b/lib/python3.6/site-packages/openstack_dashboard/settings.py
  31. @@ -55,6 +55,8 @@ if ROOT_PATH not in sys.path:
  32. DEBUG = False
  33. +SNAP_COMMON = os.environ['SNAP_COMMON']
  34. +
  35. ROOT_URLCONF = 'openstack_dashboard.urls'
  36. HORIZON_CONFIG = {
  37. @@ -216,7 +218,7 @@ USE_TZ = True
  38. DEFAULT_EXCEPTION_REPORTER_FILTER = 'horizon.exceptions.HorizonReporterFilter'
  39. SECRET_KEY = None
  40. -LOCAL_PATH = None
  41. +LOCAL_PATH = "{}/etc/horizon".format(SNAP_COMMON)
  42. ADD_INSTALLED_APPS = []
  43. @@ -265,7 +267,7 @@ else:
  44. )
  45. # allow to drop settings snippets into a local_settings_dir
  46. -LOCAL_SETTINGS_DIR_PATH = os.path.join(ROOT_PATH, "local", "local_settings.d")
  47. +LOCAL_SETTINGS_DIR_PATH = os.path.join(LOCAL_PATH, "local_settings.d")
  48. if os.path.exists(LOCAL_SETTINGS_DIR_PATH):
  49. for (dirpath, dirnames, filenames) in os.walk(LOCAL_SETTINGS_DIR_PATH):
  50. for filename in sorted(filenames):
  51. --
  52. 2.17.1