This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Aims to compose your settings from python modules and python scripts in /etc.

In your my_app/settings/ call the loader:

from django_compose_settings import modules_loader

locals().update(modules_loader(prefix='my_app', default='base,etc,post'))

In my_app/settings/ define default values as usual, ex:

import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# ...

In my_app/settings/ call the etc loader:

from django_compose_settings import etc_loader


You can validate settings in my_app/settings/ as follow:

import __settings__

assert hasattr(__settings__, 'BASE_DIR'), 'BASE_DIR required'

Etc settings

Here is a sample tree of your /etc/my_app:

├── settings.d
│   ├──
│   └──

Each .py file is a regular composable settings file as above.


You can override your settings with a specific SETTINGS environment variable for your app as follow:

$ MY_APP_SETTINGS=base,post python

>>> import logging
>>> logging.basicConfig(
...     level=logging.INFO,
...     format='%(asctime)s %(levelname)-8s %(name)s  %(message)s'
... )

>>> import os
>>> import sys
>>> sys.path.append(os.path.join(os.path.abspath('tests'), 'fixtures'))

>>> from my_app import settings

2015-11-23 10:59:09,964 INFO     django_compose_settings  Loaded my_app.settings.base
2015-11-23 10:59:09,964 INFO     django_compose_settings  Loaded
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_compose_settings-0.1-py2-none-any.whl (6.2 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jan 15, 2016
django-compose-settings-0.1.tar.gz (4.6 kB) Copy SHA256 Checksum SHA256 Source Jan 15, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting