我正在尝试使用pythonanywhere在整个项目中部署Django项目,但遇到了问题并且确实卡住了。谁能帮助我。
我从2天开始就坚持使用。请帮助我解决此错误。
WSGI.py配置
import os
import sys
path = '/home/blogaspp/django_project'
if path not in sys.path:
sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'django_project.settings'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
重新加载页面后显示的错误是
2019-02-22 15:32:43,068: Error running WSGI application
2019-02-22 15:32:43,078: ImportError: No module named 'mysite'
2019-02-22 15:32:43,078: File "/var/www/blogaspp_pythonanywhere_com_wsgi.py", line 16, in <module>
2019-02-22 15:32:43,079: application = get_wsgi_application()
2019-02-22 15:32:43,079:
2019-02-22 15:32:43,079: File "/home/blogaspp/.virtualenvs/myenv/lib/python3.5/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2019-02-22 15:32:43,079: django.setup(set_prefix=False)
2019-02-22 15:32:43,080:
2019-02-22 15:32:43,080: File "/home/blogaspp/.virtualenvs/myenv/lib/python3.5/site-packages/django/__init__.py", line 19, in setup
2019-02-22 15:32:43,080: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2019-02-22 15:32:43,080:
2019-02-22 15:32:43,080: File "/home/blogaspp/.virtualenvs/myenv/lib/python3.5/site-packages/django/conf/__init__.py", line 57, in __getattr__
2019-02-22 15:32:43,081: self._setup(name)
2019-02-22 15:32:43,081:
2019-02-22 15:32:43,081: File "/home/blogaspp/.virtualenvs/myenv/lib/python3.5/site-packages/django/conf/__init__.py", line 44, in _setup
2019-02-22 15:32:43,082: self._wrapped = Settings(settings_module)
2019-02-22 15:32:43,082:
2019-02-22 15:32:43,082: File "/home/blogaspp/.virtualenvs/myenv/lib/python3.5/site-packages/django/conf/__init__.py", line 107, in __init__