Move Developer enabled/ files to contrib

This patch moves the developer panel enabled files to contrib, to stop
any strange behaviour when interacting with settings from enabled files
and prevent warning logs when DEBUG is False.

Change-Id: If7a2d023afe418b6dd90edf8a4a1d3bc9646c7ad
This commit is contained in:
Rob Cresswell 2016-08-19 18:14:46 +01:00 committed by Timur Sufiev
parent b89c1abfa5
commit fbbe16f76d
7 changed files with 15 additions and 9 deletions

View File

@ -12,6 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from django.conf import settings
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
import horizon import horizon
@ -23,4 +24,5 @@ class Developer(horizon.Dashboard):
default_panel = "theme_preview" default_panel = "theme_preview"
horizon.register(Developer) if getattr(settings, 'DEBUG', False):
horizon.register(Developer)

View File

@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from django.conf import settings
DASHBOARD = 'developer' DASHBOARD = 'developer'
ADD_ANGULAR_MODULES = [ ADD_ANGULAR_MODULES = [
@ -29,8 +27,3 @@ ADD_SCSS_FILES = [
] ]
AUTO_DISCOVER_STATIC_FILES = True AUTO_DISCOVER_STATIC_FILES = True
DISABLED = True
if getattr(settings, 'DEBUG', False):
DISABLED = False

View File

@ -106,6 +106,7 @@ STATICFILES_DIRS = settings_utils.get_xstatic_dirs(
) )
# Load the pluggable dashboard settings # Load the pluggable dashboard settings
import openstack_dashboard.contrib.developer.enabled
import openstack_dashboard.enabled import openstack_dashboard.enabled
import openstack_dashboard.local.enabled import openstack_dashboard.local.enabled
@ -113,7 +114,8 @@ INSTALLED_APPS = list(INSTALLED_APPS) # Make sure it's mutable
settings_utils.update_dashboards( settings_utils.update_dashboards(
[ [
openstack_dashboard.enabled, openstack_dashboard.enabled,
openstack_dashboard.local.enabled openstack_dashboard.local.enabled,
openstack_dashboard.contrib.developer.enabled
], ],
HORIZON_CONFIG, HORIZON_CONFIG,
INSTALLED_APPS, INSTALLED_APPS,

View File

@ -0,0 +1,9 @@
---
upgrade:
- The developer enabled files have been moved from
``openstack_dashboard/enabled`` to
``openstack_dashboard/contrib/developer/enabled``. To enable them, copy
into ``openstack_dashboard/local/enabled`` and set ``DEBUG = True``.
fixes:
- There will no longer be any ``WARNING`` messages regarding
the developer panels in logs.