Exemplo n.º 1
0
        DEFAULT_THEME,
        SELECTABLE_THEMES
    )
)

if CUSTOM_THEME_PATH is not None:
    _LOG.warning("CUSTOM_THEME_PATH has been deprecated.  Please convert "
                 "your settings to make use of AVAILABLE_THEMES.")

if DEFAULT_THEME_PATH is not None:
    _LOG.warning("DEFAULT_THEME_PATH has been deprecated.  Please convert "
                 "your settings to make use of AVAILABLE_THEMES.")

# Discover all the directories that contain static files; at the same time
# discover all the xstatic module entry points to embed in our HTML
STATICFILES_DIRS = settings_utils.get_xstatic_dirs(
    XSTATIC_MODULES, HORIZON_CONFIG)
STATICFILES_DIRS += theme_settings.get_theme_static_dirs(
    AVAILABLE_THEMES, THEME_COLLECTION_DIR, ROOT_PATH)

# Ensure that we always have a SECRET_KEY set, even when no local_settings.py
# file is present. See local_settings.py.example for full documentation on the
# horizon.utils.secret_key module and its use.
if not SECRET_KEY:
    if not LOCAL_PATH:
        LOCAL_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                  'local')

    from horizon.utils import secret_key
    SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH,
                                                       '.secret_key_store'))
Exemplo n.º 2
0
    'help_url': "http://docs.openstack.org",
    'exceptions': {'recoverable': exceptions.RECOVERABLE,
                   'not_found': exceptions.NOT_FOUND,
                   'unauthorized': exceptions.UNAUTHORIZED},
    'angular_modules': [],
    'js_files': [],
}

ANGULAR_FEATURES = {
    'images_panel': False,  # Use the legacy panel so unit tests are still run
    'flavors_panel': False,
    'roles_panel': False,
}

STATICFILES_DIRS = settings_utils.get_xstatic_dirs(
    settings_utils.BASE_XSTATIC_MODULES, HORIZON_CONFIG
)

# Load the pluggable dashboard settings
import openstack_dashboard.enabled

INSTALLED_APPS = list(INSTALLED_APPS)  # Make sure it's mutable
settings_utils.update_dashboards(
    [
        openstack_dashboard.enabled,
    ],
    HORIZON_CONFIG,
    INSTALLED_APPS,
)

OPENSTACK_PROFILER = {'enabled': False}