Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

An entry-point based solution to extendthe Django configuration.

Project Description


With django-extraconfig it’s easy to extend a Django project file. The only function provided by this module is load_extraconfig(entry_point_name, module_name).

extraconfig.load(entry_point_name, module_name)
Loads all uppercase values from the entry point modules into the module with the name module_name overriding any existing values.


At the bottom of your file add:

    import extraconfig
except ImportError:
    extraconfig.load(<entry_point_name>, __name__)

entry_point_name can be any string value but it’s a good practice to include the projectname in order to avoid name collisions. For example to load the extra configuration showed below, entry_point_name should be set to “my_project.extraconfig”.

Creating an extra configuration

It’s easy to create an extra configuration module. The minimal project layout is composed of two files: and the module file. The module will be installed using the file just like any other regular Python module. In order for django-extraconfig to know that this module should be used to override your Django configuration in you must add it in the entry point config.

A minimal file can look like this:

from setuptools import setup

    entry_points = {
        'my_project.extraconfig': 'main = my_extra_config'

Now you can add a file with the settings you want to override:

DEBUG = True

Installing the extra configuration

Once the extra configuration project is ready you can run:

python develop

This will install the extra configuration module in development mode, meaning you can edit the extra settings and all the changes will be visible without reinstalling it.

Release History

This version
History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(2.1 kB) Copy SHA256 Hash SHA256
Source Sep 27, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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