Remove deprecated features
When running in httpd, Django complains about deprecations. Settings also contained some code to be removed in H relase. Fixes bug 1172222 Change-Id: I17d7e2e7c23fd53fadf2a62c0568f61704bdf0b3
This commit is contained in:
parent
4a19755899
commit
81b78dd1c7
@ -50,7 +50,6 @@ MEDIA_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'media'))
|
||||
MEDIA_URL = '/media/'
|
||||
STATIC_ROOT = os.path.abspath(os.path.join(ROOT_PATH, '..', 'static'))
|
||||
STATIC_URL = '/static/'
|
||||
ADMIN_MEDIA_PREFIX = '/static/admin/'
|
||||
|
||||
ROOT_URLCONF = 'openstack_dashboard.urls'
|
||||
|
||||
@ -191,30 +190,3 @@ COMPRESS_OFFLINE_CONTEXT = {
|
||||
|
||||
if DEBUG:
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
|
||||
# Deprecation for Essex/Folsom dashboard names; remove this code in H.
|
||||
_renames = (
|
||||
('horizon.dashboards.nova', 'openstack_dashboard.dashboards.project'),
|
||||
('horizon.dashboards.syspanel', 'openstack_dashboard.dashboards.admin'),
|
||||
('horizon.dashboards.settings', 'openstack_dashboard.dashboards.settings')
|
||||
)
|
||||
|
||||
INSTALLED_APPS = list(INSTALLED_APPS)
|
||||
_dashboards = list(HORIZON_CONFIG['dashboards'])
|
||||
|
||||
for old, new in _renames:
|
||||
if old in INSTALLED_APPS:
|
||||
warnings.warn('The "%s" package is deprecated. Please update your '
|
||||
'INSTALLED_APPS setting to use the new "%s" package.\n'
|
||||
% (old, new), Warning)
|
||||
INSTALLED_APPS[INSTALLED_APPS.index(old)] = new
|
||||
_old_name = old.split(".")[-1]
|
||||
if _old_name in HORIZON_CONFIG['dashboards'] and _old_name != "settings":
|
||||
_new_name = new.split(".")[-1]
|
||||
warnings.warn('The "%s" dashboard name is deprecated. Please update '
|
||||
'your HORIZON_CONFIG["dashboards"] setting to use the '
|
||||
'new "%s" dashboard name.\n' % (_old_name, _new_name),
|
||||
Warning)
|
||||
_dashboards[_dashboards.index(_old_name)] = _new_name
|
||||
HORIZON_CONFIG['dashboards'] = _dashboards
|
||||
|
Loading…
Reference in New Issue
Block a user