Django 1.8 release notes | Django documentation | Django

14 views
Skip to first unread message

Lemuel Formacil

unread,
Apr 2, 2015, 11:53:55 AM4/2/15
to python-mena

Lemuel Formacil

unread,
Apr 2, 2015, 12:05:02 PM4/2/15
to python-mena
tl;dr: no support for .env files yet. I'll stick with 1.4 :-/

--
Lemuel



> On Apr 2, 2015, at 7:53 PM, Lemuel Formacil <lem...@gmail.com> wrote:
>
>
> https://docs.djangoproject.com/en/1.8/releases/1.8/
>
>

Abdullah Diab

unread,
Apr 2, 2015, 12:28:56 PM4/2/15
to Lemuel Formacil, python-mena
I would use it for its template engine and would replace all my old templates with Jinja2 :P

P.S. You can use https://github.com/jpadilla/django-dotenv or one of its forks.



Abdullah Diab, Software Engineer.
Amsterdam, Netherlands
Mobile: +31 (0) 62 00 64 011
mpc...@gmail.com
http://mpcabd.igeex.biz

 LinkedIn  Blog RSS  Twitter

--
You received this message because you are subscribed to the Google Groups "from mena import python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-mena...@googlegroups.com.
To post to this group, send email to pytho...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lemuel Formacil

unread,
Apr 3, 2015, 5:45:30 AM4/3/15
to Abdullah Diab, python-mena
Yeah, that's what I used in one of my projects.  There's nothing "django" to it, though, as all it does is modify your `os.environ`.  You still need to modify all your entry points to invoke it (`manage.py`, _AND_ `wsgi.py`, which the developer forgot to mention in the README.)

I think it will be more django idiomatic if, after adding it to your `INSTALLED_APPS`, it will redefine all your management commands to load the `.env` file first, reload the settings, and then call the original command.  For the wsgi entry-point, maybe offer a new wsgi module that wraps the original in a middleware that loads the .env file.

Yeah, they're all ugly hacks that's why I think it should be added to the core for a cleaner solution.  I thought that since @jacobian is already at Heroku, `.env` files will have first-class support in django :P


-- 
Lemuel
Reply all
Reply to author
Forward
0 new messages