-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Customize Django settings via environment or
settings_local.py
(#100)
Enable two new ways to customize the settings: (1) overwrite settings using a `local_settings.py`; (2) use environment variables with prefix `QLEVERUI_`, for example `QLEVERUI_DEBUG` (see the default `.env` file for a complete list). Each environment variable can also be set using a file, for example `QLEVERUI_SECRET_KEY_FILE` (the respective setting then gets the content of that file as value). In particular, this fixes #92. Customizing the settings via `settings_secret.py` for `SECRET_KEY` and `ALLOWED_HOSTS` is still supported but deprecated. Instead, `settings_local.py` should now be used. For the migration, all assignments to the default value should be deleted and the file should be renamed from `settings_secret.py` to `settings_local.py`.
- Loading branch information
Showing
11 changed files
with
86 additions
and
49 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This file will be read during the startup of Qlever UI. You can set the values in this file or in environment variables. | ||
# The available settings are listed below. For further configuration set the values in a `settings_local.py`. | ||
#QLEVERUI_SECRET_KEY=!!super_secret!! | ||
#QLEVERUI_DEBUG=True | ||
# Use comma as a separator between items. For example `https://tf.uni-freiburg.de,https://uni-freiburg.de` | ||
#QLEVERUI_ALLOWED_HOSTS=* | ||
#QLEVERUI_CSRF_TRUSTED_ORIGINS=https://*.uni-freiburg.de | ||
#QLEVERUI_DATABASE_URL=sqlite:////absolute/path/to/db/qleverui.sqlite3 |
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 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 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 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 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 file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ requests==2.32.0 | |
django-import-export==3.3.7 | ||
gunicorn==22.0.0 | ||
whitenoise[brotli]==6.6.0 | ||
django-environ==0.11.2 |