Skip to main content

Django Settings JSON helps you handle environment variables when can't use them directly from the 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

django-settings-json-1.0.3.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

django_settings_json-1.0.3-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page