Django deployment problem in Apache/mod_wsgi. ImportError: Could not import settings 'site.settings'

后端 未结 5 1561
野性不改
野性不改 2021-01-05 09:15

When I\'m executing

django-admin.py startproject site

it works.
But if I\'m only copying site folder it doesn\'t work.
Why?

5条回答
  •  梦谈多话
    2021-01-05 10:03

    This doesn't appear to be the problem in your case, but I ran smack into the same ImportError when I used the WSGIPythonPath directive (instead of the .wsgi file) to set up sys.path. That worked fine until I switched to running WSGI in daemon mode. Once you do that, you have to use the python-path argument to the WSGIDaemonProcess directive instead.

提交回复
热议问题