-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧(database) allow configuring database with environment variables
The "DATABASES" setting expects a dictionary and we would like to be able to set it via environment variables but they only allow strings. With the new "formatter" functionality, we can solve this by passing a json string and parsing it when reading the setting from the environment variable.
- Loading branch information
1 parent
a114a42
commit 1dcb2bf
Showing
2 changed files
with
3 additions
and
0 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
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 |
---|---|---|
|
@@ -593,6 +593,7 @@ | |
"PASSWORD": "password", | ||
} | ||
}, | ||
formatter=json.loads, | ||
) | ||
|
||
XQUEUE_INTERFACE = config( | ||
|