Override local_settings variables without changing the file
In Horizon there is a local_settings.py file which can be used to set custom setting parameters. For example, CUSTOM_THEME_PATH can be set in this file to use non-default theme.
When installing a new theme (i.e. via a rpm/deb package), the local_settings.py file must be edited to use the theme. This is something that is forbidden during a package installation.
So the possible solution is to be able to drop extra setting files into a directory like local_settings.d/ . Theses files are loaded after local_settings.py so theses snippets can override settings from the local_settings.py file.
Blueprint information
- Status:
- Complete
- Approver:
- David Lyle
- Priority:
- High
- Drafter:
- Thomas Bechtold
- Direction:
- Approved
- Assignee:
- Thomas Bechtold
- Definition:
- Approved
- Series goal:
- Accepted for mitaka
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- David Lyle
- Completed by
- David Lyle
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Add local_settings.d/ dir for settings snippets
[mrunge, Nov-12-2015]:
This blueprint enables overriding variables in local_settings. When you're deploying horizon via distribution packages, you might want to override settings in local_settings, when installing a horizon plugin.
When using distribution packages, it's strictly not wanted to change configuration files automatically, depending on installed other software packages.
[Thomas Goirand (zigo) Nov-13-2015]:
You have my full support for implementing a local_settings.d folder. I'd like also to make sure that everyone understand it shouldn't be abused by upstream authors, and that it is typically something that distro only will use. I also would like to highlight that this is the kind of things many software implement (for example: Apache), and that it is very convenient for users, including those working on puppet. It also helps having persistent config on upgrades.
Addressed by: https:/
Dynamic Themes