大家好。尝试使用Python部署django站点时,出现错误:
这里是我的WSGI配置文件:/var/www/cargoglobal\u pythonanwhere\u com\u WSGI.py:
import os
import sys
path = '/home/cargoglobal/CargoGlobal.net'
if path not in sys.path:
sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'elansayti.settings'
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
application = DjangoWhiteNoise(get_wsgi_application())
这里是我的项目wsgi.py:
"""
WSGI config for elansayti project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'elansayti.settings')
application = get_wsgi_application()
请帮帮我,伙计们。我是一个非常无助的人。
目前没有回答
相关问题 更多 >
编程相关推荐