Purpose:
API development with DRF
Development environment
Mac os
Django Version: 3.2.22
Docker
Error contents:
django.core.management import error in manage.py django.core.wsgi import error in wusgi.py
What I tried
・Check whether django and other packages are installed in the container
As a result, they were installed
root@980ee4cb2924:/code# python -m pip show django
Name: Django
Version: 3.2.22
・Check volume mount
Correctly configured
・Is the PYTHONPATH specified correctly?
Correctly configured
Docker-compose file
environment:
- DJANGO_SETTINGS_MODULE=config.settings.development
- PYTHONPATH=/code
- PYTHONUNBUFFERED=1
I also checked to see if the packages were properly installed in the Docker container.
From what I’ve researched, I believe I’ve set it up correctly, but the error hasn’t been resolved yet, so I’d like to know other ways to solve the problem.