Django Settings JSON is a small package for helping you have environment variables when you can't use them directly from your operational system.
Project description
django-settings-json
Sample settings.json
file:
{
"DEBUG": true,
"TIME_ZONE": "America/New_York"
}
Usage
Use get_setting()
when retrieving environment variables on your settings.py
file:
from settings_json import get_setting
DEBUG = get_setting('DEBUG')
TIME_ZONE = get_setting('TIME_ZONE')
GitIgnore
Remember to add settings.json
into your .gitignore
, so it don't get tracked.
settings.json
Missing Variables
If you forget to add a variable on your settings.json
, it'll raise an error like the one below:
Set the TIME_ZONE environment variable on settings.json
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-settings-json-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8f655081fd370896dac8761540a38436a671d5eff1ea5cdf78ff73fb8598211 |
|
MD5 | b1487524129dda3e533b25c37f120e7a |
|
BLAKE2b-256 | c7918f850999042523a8823834f7af2738a4ce0d556faafe969cba9a82d256fa |
Close
Hashes for django_settings_json-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c86c88ca93ee9bfcfc428628160929a8b6a122398065070be949db687173449 |
|
MD5 | 7b4b44ce2c519235b229444bffb3787f |
|
BLAKE2b-256 | 087fc43aef80a922b4ed888d12d51c9fe7030829db20ca022bc0012db1e6d698 |