Skip to content

Comments

Replace django-dotenv with python-dotenv#604

Merged
thibaudcolas merged 1 commit intowagtail:mainfrom
laymonage:fix/remove-django-dotenv
Feb 19, 2026
Merged

Replace django-dotenv with python-dotenv#604
thibaudcolas merged 1 commit intowagtail:mainfrom
laymonage:fix/remove-django-dotenv

Conversation

@laymonage
Copy link
Member

import dotenv
from django.core.wsgi import get_wsgi_application

dotenv.read_dotenv(os.path.join(os.path.dirname(os.path.dirname(__file__)), ".env"))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://github.com/theskumar/python-dotenv

By default, load_dotenv() will:

  • Look for a .env file in the same directory as the Python script (or higher up the directory tree).

So I think we're fine without explicitly resolving to the .env file.

@thibaudcolas
Copy link
Member

nice!

@thibaudcolas thibaudcolas merged commit 351562b into wagtail:main Feb 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Currently not usable due to python-dotenv & django-dotenv conflict

2 participants