Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-dotenv

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

Installation

pip install django-dotenv

Usage

Pop open manage.py. Add:

import dotenv
dotenv.read_dotenv()

You have to pass in __file__ so that we know where to find the .env file. You can also pass 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.

About

Get and set values in your .env file in local and production servers. 🎉

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages