I know this question has been asked quite a lot but all the solutions given do not seem to fit for me.
I run this in a venv with python 3.6.8 and django 2.2.10
When I run django from cli it works and all functionality is working great so I know it is not django itself that is failing me.
Path to wsgi script is "/opt/sites/aws/okta/wsgi.py"
Actual wsgi.py:
import os, sys
sys.path.append('/opt/sites/aws')
#path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
#sys.path.append(path)
print(sys.path)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "okta.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
When running python to see what errors it gives I get
ModuleNotFoundError: No module named 'okta.settings'
I get the same error when running apache with debug logging.
I have quadruple checked the path and the environment variables and they are set right in the wsgi.py script.
Asked for the INSTALLED_APPS
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'okta_oauth2.apps.OktaOauth2Config',
'ops.apps.OpsConfig'
]
aws/
bin/
lib/
lib64/
logs/
okta/
__init__.py
urls.py
settings.py
wsgi.py
okta_oauth2/
ops/
share/
static/
manage.py
pyvenv.cfg
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…