foreman reads from .env. manage.py doesn't. Let's fix that.
Project description
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)
Built Distribution
Close
Hashes for django_dotenv-1.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 120c4621d1e4f5adabe0a683463d1be7a5a6b992edd4764d323c627d229251e0 |
|
MD5 | 95843004624401ef748756ef3fb5d789 |
|
BLAKE2b-256 | 878906222efa01afd4638ef6cf0223f14f0f4f0ed47b73de498e745b95310ebb |