[openstack-dev] [horizon] Augmenting openstack_dashboard settings and possible horizon bug
tsufiev at mirantis.com
Wed Jan 15 14:30:30 UTC 2014
Recently I've decided to fix situation with Murano's dashboard and move all
Murano-specific django settings into a separate file (previously they were
/usr/share/openstack-dashboard/openstack_dashboard/settings.py). But, as I
knew, /etc/openstack_dashboard/local_settings.py is for customization by
admins and is distro-specific also - so I couldn't use it for Murano's
So the following scheme was devised: change DJANGO_SETTINGS_MODULE in
Apache config/WSGI python module to 'muranodashboard.settings' which
contains all Murano-specific settings and imports
openstack_dashboard.settings, which in turn imports local.local_settings.
This approach seemed fine until I coded it and ran: it immediately failed
with 'ImproperlyConfigured: The SECRET_KEY setting must not be empty.'
After spending some time in debugger, I found out that during
'openstack_dashboard.settings' module evaluation 'django.conf.Settings'
class is instantiated and it requires the 'SECRET_KEY' parameter to be
present in settings module referenced by DJANGO_SETTINGS_MODULE environment
variable (which, in my case is 'muranodashboard.settings'). But if I try to
avoid this error and define my own SECRET_KEY in
'muranodashboard.settings', I end up with 2 different SECRET_KEY values
(one from muranodashboard.settings, the other hanging somewhere in
horizon's machinery from local.local_settings /
openstack_dashboard.settings) which is not good either.
I have 2 questions:
1. Should this behaviour be considered as a Horizon bug or a Django bug?
2. What is the sensible approach for customizing settings for some
Horizon's dashboard in that case?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev