Correct local_settings example from overwriting settings

Currently, local_settings.py.example redefines HORIZON_CONFIG
(previously defined in settings.py). This adds to confusion as to
where proper definitions and modifications should be made.
This change ensures that only modifications of HORIZON_CONFIG
are made within local_settings.py.example and defining of
HORIZON_CONFIG is left in settings.py.

-added importing of HORIZON_CONFIG from settings

-corrected portion that was redefining HORIZON_CONFIG

-left the modal_backdrop = static change that was
occuring in the redefition in local_settings to
that of a modification and commented out to serve
as an example (conforms to usual pattern)

-migrated the default for 'modal_backdrop'
into settings.py

Change-Id: I7ddeee82258f6c871ff77e1bc03115c2adbf618e
Closes-Bug: #1472687
This commit is contained in:
Darren Shaw 2015-08-12 11:12:18 -05:00
parent ef1d49e086
commit ac558f5500
2 changed files with 5 additions and 18 deletions

View File

@ -3,6 +3,7 @@ import os
from django.utils.translation import ugettext_lazy as _
from openstack_dashboard import exceptions
from openstack_dashboard.settings import HORIZON_CONFIG
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@ -65,24 +66,9 @@ WEBROOT = '/'
# Set to None explicitly if you want to deactivate the console.
#CONSOLE_TYPE = "AUTO"
# Default OpenStack Dashboard configuration.
HORIZON_CONFIG = {
'user_home': 'openstack_dashboard.views.get_user_home',
'ajax_queue_limit': 10,
'auto_fade_alerts': {
'delay': 3000,
'fade_duration': 1500,
'types': ['alert-success', 'alert-info']
},
'help_url': "http://docs.openstack.org",
'exceptions': {'recoverable': exceptions.RECOVERABLE,
'not_found': exceptions.NOT_FOUND,
'unauthorized': exceptions.UNAUTHORIZED},
'modal_backdrop': 'static',
'angular_modules': [],
'js_files': [],
'js_spec_files': [],
}
# Show backdrop element outside the modal, do not close the modal
# after clicking on backdrop.
#HORIZON_CONFIG["modal_backdrop"] = "static"
# Specify a regular expression to validate user passwords.
#HORIZON_CONFIG["password_validator"] = {

View File

@ -64,6 +64,7 @@ HORIZON_CONFIG = {
'exceptions': {'recoverable': exceptions.RECOVERABLE,
'not_found': exceptions.NOT_FOUND,
'unauthorized': exceptions.UNAUTHORIZED},
'modal_backdrop': 'static',
'angular_modules': [],
'js_files': [],
'js_spec_files': [],