【发布时间】:2013-10-02 19:34:14
【问题描述】:
我按照本教程设置了 nginx 和 uwsgi:
http://panta.info/blog/3/how-to-install-and-configure-nginx-uwsgi-and-django-on-ubuntu.html
我收到以下错误:
Thu Sep 26 17:33:11 2013 - *** Operational MODE: preforking ***
Traceback (most recent call last):
File "/var/www/repo/mysite/mysite/mysite/wsgi.py", line 24, in <module>
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
但是当我这样做时,它会起作用:
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.core.wsgi import get_wsgi_application
>>> get_wsgi_application()
<django.core.handlers.wsgi.WSGIHandler object at 0x7f3b23281790>
>>>
我还缺少什么吗?我已经尝试调试了一段时间,感谢任何帮助!
我也参考了这个页面无济于事:
http://uwsgi-docs.readthedocs.org/en/latest/WSGIquickstart.html
【问题讨论】: