All customizable configurations should be above "from local.local_settings import *"

Bug #1527042 reported by Wang Bo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Wang Bo

Bug Description

In my deployed environment, I add some configure items at end of file dashboard/settings.py as default values. Try to overwrite some in openstack_dashboard/local/local_settings.py but failed. I find the following codes do the overwriting work:

try:
    from local.local_settings import * # noqa
except ImportError:
    logging.warning("No local_settings file found.")

To ensure overwrite working, all the default configurations in settings.py(could be customized in local_settings.py) should be above line:"from local.local_settings import *".

So we should move all customizable configurations above "from local.local_settings import *".

Wang Bo (chestack)
Changed in horizon:
assignee: nobody → Wang Bo (chestack)
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/258833

Wang Bo (chestack)
Changed in horizon:
status: New → In Progress
Changed in horizon:
importance: Undecided → Medium
milestone: none → ongoing
Changed in horizon:
milestone: ongoing → next
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/258833
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=15ac2261eb508dc8cb86046304da4e57ef3c678d
Submitter: Jenkins
Branch: master

commit 15ac2261eb508dc8cb86046304da4e57ef3c678d
Author: Bo Wang <email address hidden>
Date: Thu Dec 17 14:16:35 2015 +0800

    Ensure horizon configurations could be customized

    Users could customize horizon configuration items in two ways:
    1. overwrite item values in "local_settings.py".
    2. add *.py into local_settings.d/.
       ref:https://review.openstack.org/#/c/243974/6
    To ensure the two ways work, we should move all customizable
    configurations above the two ways in settings.py.
    Otherwise, configurations in settings.py are the real final values.

    Change-Id: I3b6a04d8bd8ec540b1f8efac93465317a0c1008d
    Closes-Bug: #1527042

Changed in horizon:
status: In Progress → Fix Released
Changed in horizon:
milestone: next → newton-1
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 10.0.0.0b1

This issue was fixed in the openstack/horizon 10.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.