<div dir="ltr">Hi there!<div><br></div><div>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 appended to /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 dashboard customization.</div>
<div><br></div><div>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.' exception.</div>
<div><br></div><div>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. </div>
<div><br></div><div>I have 2 questions:</div><div><br></div><div>1. Should this behaviour be considered as a Horizon bug or a Django bug?</div><div>2. What is the sensible approach for customizing settings for some Horizon's dashboard in that case?<br clear="all">
<div><br></div>-- <br><div dir="ltr">Timur Sufiev</div>
</div></div>