pythonanywhere:错误代码:未处理的异常

时间:2020-09-08 18:01:32

标签: python django

嗨,大家好。尝试用pythonanywhere部署我的django网站时出现错误:

enter image description here

这里是我的WSGI配置文件:/var/www/cargoglobal_pythonanywhere_com_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()

请帮助我。我很无助。

0 个答案:

没有答案