django-dotenv icon indicating copy to clipboard operation
django-dotenv copied to clipboard

Why?

Open eedwards-sk opened this issue 5 years ago • 6 comments

I looked at the source code for this project -- none of it appears to be django specific.

Why is it branded with django?

eedwards-sk avatar Dec 17 '19 17:12 eedwards-sk

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? ``

woutervh avatar Feb 19 '20 11:02 woutervh

I hit this conflict too, trying to use both this and pytest-dotenv.

Suor avatar Apr 14 '20 06:04 Suor

Same here, this should have been named something else.

skorokithakis avatar Oct 27 '20 15:10 skorokithakis

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 ?

aprilahijriyan avatar Apr 29 '21 19:04 aprilahijriyan

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

WillowP avatar Sep 20 '21 23:09 WillowP

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?

suspiciousRaccoon avatar Nov 27 '23 15:11 suspiciousRaccoon