Skip to content

Django Settings JSON is a small package for helping you have environment variables when you can't use them directly from your operational system.

License

Notifications You must be signed in to change notification settings

andrebr/django-settings-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 doesn'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

About

Django Settings JSON is a small package for helping you have environment variables when you can't use them directly from your operational system.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages