components/openstack/horizon/patches/15-fix-static-root-setting.patch
branchs11u3-sru
changeset 6035 c9748fcc32de
equal deleted inserted replaced
6016:a477397bba8b 6035:c9748fcc32de
       
     1 Patch to correct where STATIC_ROOT is set.  This has been fixed
       
     2 upstream under https://bugs.launchpad.net/horizon/+bug/1399585 but not
       
     3 yet backported to Kilo.
       
     4 
       
     5 --- horizon-2015.1.0/openstack_dashboard/settings.py.orig 2015-07-30 13:43:47.751455772 -0600
       
     6 +++ horizon-2015.1.0/openstack_dashboard/settings.py 2015-07-30 13:45:34.900930381 -0600
       
     7 @@ -258,6 +258,10 @@ ADD_INSTALLED_APPS = []
       
     8  # It can be overridden in local_settings.py
       
     9  CUSTOM_THEME_PATH = 'static/themes/default'
       
    10 
       
    11 +# Set these before importing local_settings in case they are set there
       
    12 +MEDIA_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'media'))
       
    13 +STATIC_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'static'))
       
    14 +
       
    15  try:
       
    16      from local.local_settings import *  # noqa
       
    17  except ImportError:
       
    18 @@ -272,9 +276,7 @@ if LOGOUT_URL is None:
       
    19  if LOGIN_REDIRECT_URL is None:
       
    20      LOGIN_REDIRECT_URL = WEBROOT
       
    21 
       
    22 -MEDIA_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'media'))
       
    23  MEDIA_URL = WEBROOT + 'media/'
       
    24 -STATIC_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'static'))
       
    25  STATIC_URL = WEBROOT + 'static/'
       
    26  STATICFILES_DIRS = get_staticfiles_dirs(WEBROOT)
       
    27