Merge "Fix developer panel when debug is set to False"

This commit is contained in:
Zuul 2019-01-22 13:41:26 +00:00 committed by Gerrit Code Review
commit fbcc378e3e

View File

@ -23,6 +23,10 @@ class Developer(horizon.Dashboard):
slug = "developer"
default_panel = "theme_preview"
def allowed(self, context):
if not getattr(settings, 'DEBUG', False):
return False
return super(Developer, self).allowed(context)
if getattr(settings, 'DEBUG', False):
horizon.register(Developer)
horizon.register(Developer)