diff options
author | Akihiro Motoki <amotoki@gmail.com> | 2019-04-18 09:12:57 +0900 |
---|---|---|
committer | Akihiro Motoki <amotoki@gmail.com> | 2019-09-12 15:05:56 +0900 |
commit | 9b99f171003d4c5ad3a6c0e939229b8c7f60f349 (patch) | |
tree | dddf36c60a8438bf468fe852db722da404512af7 /openstack_dashboard | |
parent | 7c897b677cc4e7eb11d90fce448160c2b90d1ef4 (diff) | |
download | horizon-9b99f171003d4c5ad3a6c0e939229b8c7f60f349.tar.gz |
Define default settings explicitly (horizon)
test_parse_isotime_filter in test_filters is updated to match
TIME_ZONE=UTC. Previously TIME_ZONE was not set in horizon.test.settings
and the default value America/Chicago was used. Horizon uses UTC as the
default value of TIME_ZONE, so it is better to use UTC for testing too.
horizon settings in openstack_dashboard.settings are moved to
under horizon.
Part of blueprint ini-based-configuration
Change-Id: I9abdbbe0dcefc08ffea61143e3c0a87ed87b2e2a
Diffstat (limited to 'openstack_dashboard')
-rw-r--r-- | openstack_dashboard/defaults.py | 17 | ||||
-rw-r--r-- | openstack_dashboard/settings.py | 21 |
2 files changed, 9 insertions, 29 deletions
diff --git a/openstack_dashboard/defaults.py b/openstack_dashboard/defaults.py index fb7727e79..87472a2e5 100644 --- a/openstack_dashboard/defaults.py +++ b/openstack_dashboard/defaults.py @@ -16,16 +16,17 @@ import os from django.utils.translation import ugettext_lazy as _ -from openstack_auth.defaults import * # noqa: F403,H303 +# openstack_auth.default is imported in horizon.defaults. +from horizon.defaults import * # noqa: F403,H303 def _get_root_path(): return os.path.dirname(os.path.abspath(__file__)) -# ------------------------------------------- -# Override openstack_auth and Django settings -# ------------------------------------------- +# --------------------------------------------------- +# Override horizn, openstack_auth and Django settings +# --------------------------------------------------- WEBROOT = '/' # from openstack_auth @@ -475,14 +476,6 @@ OPENSTACK_CLOUDS_YAML_NAME = 'openstack' # If this cloud has a vendor profile in os-client-config, put it's name here. OPENSTACK_CLOUDS_YAML_PROFILE = '' -OPENSTACK_PROFILER = { - 'enabled': False, - 'facility_name': 'horizon', - 'keys': [], - 'receiver_connection_string': "mongodb://", - 'notifier_connection_string': None, -} - # AngularJS requires some settings to be made available to # the client side. Some settings are required by in-tree / built-in horizon # features. These settings must be added to REST_API_REQUIRED_SETTINGS in the diff --git a/openstack_dashboard/settings.py b/openstack_dashboard/settings.py index 6b92f6213..e0bbfd083 100644 --- a/openstack_dashboard/settings.py +++ b/openstack_dashboard/settings.py @@ -40,6 +40,10 @@ from openstack_dashboard.utils import settings as settings_utils monkeypatch_escape() +# Load default values +# pylint: disable=wrong-import-position +from openstack_dashboard.defaults import * # noqa: F403,H303 + _LOG = logging.getLogger(__name__) warnings.formatwarning = lambda message, category, *args, **kwargs: \ @@ -183,24 +187,11 @@ SESSION_COOKIE_HTTPONLY = True SESSION_EXPIRE_AT_BROWSER_CLOSE = True SESSION_COOKIE_SECURE = False -# Control whether the SESSION_TIMEOUT period is refreshed due to activity. If -# False, SESSION_TIMEOUT acts as a hard limit. -SESSION_REFRESH = True - -# When using cookie-based sessions, log error when the session cookie exceeds -# the following size (common browsers drop cookies above a certain size): -SESSION_COOKIE_MAX_SIZE = 4093 - # when doing upgrades, it may be wise to stick to PickleSerializer # NOTE(berendt): Check during the K-cycle if this variable can be removed. # https://bugs.launchpad.net/horizon/+bug/1349463 SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer' -# MEMOIZED_MAX_SIZE_DEFAULT allows setting a global default to help control -# memory usage when caching. It should at least be 2 x the number of threads -# with a little bit of extra buffer. -MEMOIZED_MAX_SIZE_DEFAULT = 25 - CSRF_FAILURE_VIEW = 'openstack_dashboard.views.csrf_failure' LANGUAGES = ( @@ -278,10 +269,6 @@ ANGULAR_FEATURES = { # Notice all customizable configurations should be above this line XSTATIC_MODULES = settings_utils.BASE_XSTATIC_MODULES -# Load default values -# pylint: disable=wrong-import-position -from openstack_dashboard.defaults import * # noqa: F403,H303 - if not LOCAL_PATH: LOCAL_PATH = os.path.join(ROOT_PATH, 'local') LOCAL_SETTINGS_DIR_PATH = os.path.join(LOCAL_PATH, "local_settings.d") |