Configure django settings for multiple environments.
Project description
Django Environment Config
pip install django-environment-config
Documentation: https://mrthearman.github.io/django-environment-config/
Source Code: https://github.com/MrThearMan/django-environment-config/
Contributing: https://github.com/MrThearMan/django-environment-config/blob/main/CONTRIBUTING.md
Inspired by django-configurations, this library aims to provide a simple way to configure settings for different environments in Django applications. For example, you might want to have different settings for local development compared to production, and different still when running automated tests or in checks in you CI.
Overview
Environments are defined with a simple class-based configuration in the settings.py
module.
from env_config import Environment, values
class Example(Environment):
DEBUG = True
SECRET_KEY = values.StringValue()
ALLOWED_HOSTS = values.ListValue(default=["*"])
DATABASES = values.DatabaseURLValue()
The Environment must be selected by setting the DJANGO_SETTINGS_ENVIRONMENT
environment variable to the name of the class.
DJANGO_SETTINGS_ENVIRONMENT=Example python manage.py runserver
Check out the docs for more information.
Project details
Release history Release notifications | RSS feed
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
Hashes for django_environment_config-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a795829ffbc0c76d71f422b8347e3c29c2fe18543b07d352373b9bdb079bf208 |
|
MD5 | d9feb09c6e7a2685ff8c6e75a30d42a4 |
|
BLAKE2b-256 | ecfc31cfed177bb0a8661f240afef1d98fbadc4c9a7d9e1591b00fa767fb0253 |
Hashes for django_environment_config-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 533bd93f536e956d391468c8fdde8cff630129bf512911e4655f70d407353106 |
|
MD5 | 47c7c04c590daad773abbb9e8fbfe395 |
|
BLAKE2b-256 | f1dc146972dbbd40887f38a4fd12b8546ac65c9de611ef5b79d90cf06f91c7a6 |