-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor ColdFront settings #264
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit attempts to better organize ColdFront settings and configuration. As the number of plugins grows having a well defined way to configure the ColdFront application will be imperative. The main goals are: 1. Split the config/settings across multiple files for better organization. 2. Allow configuring ColdFront from environment variables or a env file 3. Enable easy way to set custom config values system wide for production installs as well as dev/staging environments In this commit we use django-environ to fetch config settings from the environment. We also use django-split-settings which provides a way to split up django settings across multiple files. The organization is as follows: - coldfront/config/base.py = Base Django config settings - coldfront/config/auth.py = Authenication backends - coldfront/config/database.py = Database backends - coldfront/config/email.py = Email settings - coldfront/config/logging.py = Logging settings - coldfront/config/core.py = Core ColdFront settings - coldfront/config/plugins/* = ColdFront Plugins Sites can override any config settings by creating a local_settings.py file in coldfront/config, or /etc/coldfront/local_settings.py. Additionally, they can override settings using environment variables, or an environment file. ColdFront will search for environment files in this order: .env (in current working directory) or /etc/coldfront/coldfront.env. You can also specify the path to the environment file using COLDFRONT_ENV.
dsajdak
reviewed
Mar 1, 2021
dsajdak
reviewed
Mar 1, 2021
dsajdak
reviewed
Mar 1, 2021
dsajdak
reviewed
Mar 1, 2021
dsajdak
reviewed
Mar 1, 2021
dsajdak
reviewed
Mar 1, 2021
dsajdak
reviewed
Mar 1, 2021
dsajdak
requested changes
Mar 1, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great except these couple of typos. Tested in staging all all functionality appears to work as before.
dsajdak
approved these changes
Mar 1, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor ColdFront settings.
This PR attempts to better organize ColdFront settings and configuration. As the number of plugins grows having a well defined way to configure the ColdFront application will be imperative. The main goals are:
In this commit we use django-environ to fetch config settings from the environment. We also use django-split-settings which provides a way to split up django settings across multiple files.
The organization is as follows:
Sites can override any config settings by creating a local_settings.py file in coldfront/config, or /etc/coldfront/local_settings.py. Additionally, they can override settings using environment variables, or an environment file. ColdFront will search for environment files in this order: .env (in coldfront project directory) or /etc/coldfront/coldfront.env. You can also specify the path to the environment file using COLDFRONT_ENV.