django-dotenv
django-dotenv copied to clipboard
Why?
I looked at the source code for this project -- none of it appears to be django specific.
Why is it branded with django?
I agree, but there is another project called python-dotenv, but I always use django-dotenv.
both packages import as a dotenv-module, so there is a naming conflict. you cannot use both package in the same project
``
pip install python-dotenv pip install django-dotenv
import dotenv # which one wins? ``
I hit this conflict too, trying to use both this and pytest-dotenv
.
Same here, this should have been named something else.
Yes, I agree, the package name must be changed so that there is no conflict with python-dotenv
. Maybe a good name is django_dotenv
?
I hit this conflict too, trying to use both this and
pytest-dotenv
.
Also hit this. I tried to fix it using pytest-django-dotenv, but they only support paths relative to the VIRTUAL_ENV
environment var. I'm using pyenv
so that doesn't cut it.
FWIW my solution was to switch from using the pytest
command to using python manage.py test
, enabled by the solution described in the docs here. I just copy/pasted the solution in the docs and this started working :)
Btw I'm using pytest-django
python-dotenv
seems to work well enough for me. I use load_dotenv()
in manage.py
and I can access .env variables from settings. Does this project have any additional functionality?