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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file django-settings-json-1.0.3.tar.gz.

File metadata

  • Download URL: django-settings-json-1.0.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for django-settings-json-1.0.3.tar.gz
Algorithm Hash digest
SHA256 53020e1d33753c7b62ba5bfd4e8488c849ece666ac2366cb857e24c7b49b88dc
MD5 9369caeded1da80e14ca979e0f7daaad
BLAKE2b-256 70ecd474d1e54671d84d93f79e14c32ebb313cfbc098fc38d6e0202d7bf9cbd0

See more details on using hashes here.

File details

Details for the file django_settings_json-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_settings_json-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 52b3ee0a914664f3f3f39b61308339a43727c71e23ce818451504a0e80f6d637
MD5 9ccd8ceaf833655c2e1b64a6d049a76c
BLAKE2b-256 ef93bd829a408ce78352aad82a629c6a921f5abed7c2f4f58e2386bf752be942

See more details on using hashes here.

Supported by

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