Django dotenv
Published: 10/30/2013 03:22 p.m.
I recently found out about a django project, django-dotenv, from Jacob Kaplan-Moss that loads a .env file from the project root and parses keys there to add to the environment. This models the way foreman adds environment variables, which is a common tool to test Heroku compatibility.
This project sparked my interest because this is exactly what we have done with Tendenci since October 5th, 2012, which was inspired by some work I had done on a personal project, ProMan, from July 22, 2012. I can't recall where I initially saw this method, but it even predates those projects. But, this post isn't about saying "I was here first" or any other kind of credit-grabbing. It's about a smart design pattern taking off in the community.
I'm excited to see this project now created as a pluggable app, which modifies manage.py instead of settings.py, which is effectively a higher level and would allow for maintaining environments while switching settings files. I'm also excited to see it promoted by a well-known member of the Django and Python community. This means a higher level of attention, and hopefully a higher level of adoption.
I plan on taking full advantage of this new app in future projects (hopefully Django and Flask).