horizon/horizon/conf
Alexey Izbyshev 50c21151b5 Fix circular dependencies in dashboard settings
Importing horizon.utils from dashboard local_settings.py to generate
SECRET_KEY results in a sequence of imports, and horizon.conf.default
module gets imported at some point. During initialization of default
HORIZON_CONFIG this module uses settings.LOGIN_REDIRECT_URL and
ugettext() call. Both of them need django settings to be ready to use,
therefore settings initialization starts again before it could finish.

Since Python processes module only when it is imported the first time,
this process stops, but the 'inner' settings object contains only
parameters that were set above the point of import of local_settings.
Therefore Django complains about missing SECRET_KEY when it processes
'inner' settings.

The fix moves the import of horizon.conf.default to
LazySetting._setup(). If keys of HORIZON_CONFIG obtained from
horizon.conf are not used within openstask_dashboard settings.py
or local_settings.py, the circular import won't happen.

Fixes bug #1154564

Change-Id: If63ab1920ecc8e646fd5b6cc52c106ae0876fa2d
2013-03-13 16:18:00 +04:00
..
dash_template Allow setup.py bdist to complete happily. 2012-05-21 15:42:26 -07:00
panel_template Splits OpenStack Dashboard bits from framework app code. 2012-10-11 11:47:50 -07:00
__init__.py Fix circular dependencies in dashboard settings 2013-03-13 16:18:00 +04:00
default.py Allow password-field autocomplete to be configured in settings. 2013-02-06 14:52:22 -05:00