之前一直在一台CentOS 6 下用 Cherokee + uwsgi + django 的运行环境,很稳定跑了一年了
最近又入了一个VMS ,运行环境尝试改为 nginx + uwsgi ,目前的问题是:
uwsgi 下最简单的test.py 运行没有问题
test.py代码:
def application(env,start_response):
start_response('200 OK',[('Content-Type','text/html')])
return "hello world"
但是一涉及到模板引用就会出现错误:
django.template.base.TemplateSyntaxError: Caught ImportError while rendering: cannot import name utils
初步分析是因为 django_wsgi.py 文件下sys.path设置不正确,增加了当前文件目录及父文件目录后问题依旧
放狗搜没有结果,盼释疑...
最近又入了一个VMS ,运行环境尝试改为 nginx + uwsgi ,目前的问题是:
uwsgi 下最简单的test.py 运行没有问题
test.py代码:
def application(env,start_response):
start_response('200 OK',[('Content-Type','text/html')])
return "hello world"
但是一涉及到模板引用就会出现错误:
django.template.base.TemplateSyntaxError: Caught ImportError while rendering: cannot import name utils
初步分析是因为 django_wsgi.py 文件下sys.path设置不正确,增加了当前文件目录及父文件目录后问题依旧
放狗搜没有结果,盼释疑...