Skip to main content

foreman reads from .env. manage.py doesn't. Let's fix that.

Project description

Build Status PyPI Version

foreman reads from .env. manage.py doesn’t. Let’s fix that.

Tested on Python 2.6, 2.7, 3.2, 3.3, and 3.4.

Installation

pip install django-dotenv

Usage

Pop open manage.py. Add:

import dotenv
dotenv.read_dotenv()

You can also pass read_dotenv() an explicit path to the .env file, or to the directory where it lives. It’s smart, it’ll figure it out.

That’s it. Now go 12 factor the crap out of something.

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-dotenv-1.3.0.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

django_dotenv-1.3.0-py2.py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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