Socket
Socket
Sign inDemoInstall

django-settings-json

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    django-settings-json

Django Settings JSON helps you handle environment variables when can't use them directly from the operational system.


Maintainers
1

Readme

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

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc