Replies: 14 comments 4 replies
-
I don't bother with |
Beta Was this translation helpful? Give feedback.
-
Honestly, I don't even know. There were some people complaining about not being able to use the |
Beta Was this translation helpful? Give feedback.
-
@svleeuwen, see #985 |
Beta Was this translation helpful? Give feedback.
-
I understand that, but since you will mostly use Cookiecutter Django to instantiate project in development environment it may be handy to have reading of .env file turned on by default or maybe even better add the possibility to choose the setting in cookiecutter script. |
Beta Was this translation helpful? Give feedback.
-
I do not use the .env file in development so I do not want it turned on by default. Keep in mind I'm not too happy with how django-environ manages the .env file behavior, as I know it's confusing and annoying. At some point I may give up and we'll implement something of our own. |
Beta Was this translation helpful? Give feedback.
-
Are you given though to this on replacing django-environ with another package or to develop an inhouse implementation? If the alternative is to incorporate another package, which one would be a good candidate? |
Beta Was this translation helpful? Give feedback.
-
Replacing this package will be a lot of work. Except for some edge cases, it works okay, so why spend the effort? Also, I would rather piggy back of a package then invent something new that has to be maintained. Unless there's a pressing need, and funds to support the reviews by core maintainers are made available, we're not switching.
Why don't you do the research yourself instead of asking others to volunteer their free time? Compare a dozen options for suitability, summarize the ones you think are good, and suggest the best three in a separate issue. |
Beta Was this translation helpful? Give feedback.
-
What I was really looking for was perhaps a slightly more interesting conversation and perhaps some introspection about the previous experience some of you might have on the subject; but leaving aside the disobliging response and to abandon the line of argument and focus on something that is worth the time: I had already done some work on this, testing some of the packages that available out there, and wanted to listen to the opinions of those who had tried the same process before: EnvParse - It requires a lot of legwork with its preprocessors which makes the implementation much harder than it should be, and the project is inactive. |
Beta Was this translation helpful? Give feedback.
-
I was just looking to see how I could use the .env file in dev automatically without needing to define the DJANGO_READ_DOT_ENV_FILE environment variable. This little hack in config/settings/local.py seems to do the trick nicely. I figured it might give the next person a head start. If there is a better way please let us know. config/settings/local.py
|
Beta Was this translation helpful? Give feedback.
-
@jeffcjohnson nice trick |
Beta Was this translation helpful? Give feedback.
-
prettyconf - PrettyConf is a Python library created to make easy the separation of configuration and code following the recomendations of 12 Factor's topic about configs. It is strongly inspired in python-decouple and both provides a similar API. (The project is active, and the code stable.) |
Beta Was this translation helpful? Give feedback.
-
My 2 cents: |
Beta Was this translation helpful? Give feedback.
-
Hello How/Where do you store your DB connection strings then ? What if you have two different dev environment which need different settings ? |
Beta Was this translation helpful? Give feedback.
-
Picking up on this conversations, cookiecutter-django/{{cookiecutter.project_slug}}/.gitignore Lines 70 to 73 in e3a232a Should I make a PR? |
Beta Was this translation helpful? Give feedback.
-
Since this commit, the .env isn't loaded without manually setting
DJANGO_READ_DOT_ENV_FILE
.The comment states:
I don't really agree with this since we use .env files extensively on production servers. Not a big problem as we can easily add
DJANGO_READ_DOT_ENV_FILE
to the supervisor config. But I don't understand what problem it fixes.For local development this is a bit cumbersome. There's no documentation explaining the need to set this variable. I'd expect it here for example.
This env variable also isn't set in local docker config (
dev.yml
), disabling the possibility to overwrite settings via a .env file.Beta Was this translation helpful? Give feedback.
All reactions