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

Can't use with pytest-django and pytest-dotenv

Open mihalt opened this issue 3 years ago • 1 comments

Hi! I am using pytest-dotenv, but it installs python-doenv by default and can't work without it. So, I have error when run django AttributeError: module 'dotenv' has no attribute 'read_dotenv'. Did you mean: 'load_dotenv'?. When run tests, all is fine.

What could you offer to prevent it?

mihalt avatar Jun 07 '22 17:06 mihalt

see https://github.com/jpadilla/django-dotenv/issues/50

this module should be renamed to django_dotenv.

You can still alias this for your own backwards compatibility

>>> import django_dotenv as dotenv

woutervh avatar Oct 10 '23 10:10 woutervh