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!

Make your django local_settings play nice with Heroku

Project Description

Provides crosswalk between a Foreman-style .env file and your django local settings.

Installation & Usage

Add to your django project’s requirements.txt:


Add herokal to INSTALLED_APPS

Install the heroku-config plugin:

heroku plugins:install git://

Run the management command to export your

./ exportenv

At the bottom of your, instead of:

from local_settings import *

Use herokal.settings:

from herokal.settings import *

Now, when you run ./ runserver, your will be loaded, but when you run foreman start, your .env will be used.


The exportenv command takes a few optional flags:

--settings-module           The name of the settings module to export.
                            Default is 'local_settings'

--include-databases         Whether or not to serialize database
                            connections into the .env file.
                            Default is false

--outfile                   The name of the file to export your
                            local settings to.
                            Default is '.env'



  • Initial release

Release History

This version
History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(7.1 kB) Copy SHA256 Hash SHA256
Egg 2.7 Jun 4, 2013
(3.1 kB) Copy SHA256 Hash SHA256
Source None Jun 4, 2013

Supported By

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 Google Google Cloud Servers DreamHost DreamHost Log Hosting