template not found, deploying Pyramid on Webfaction

不打扰是莪最后的温柔 提交于 2019-12-06 07:35:14

Since the search path is '..webapps/myapp/lib/python2.7/site-packages/Project-0.0-py2.7.egg/project/templates', that tells me you installed your application as an egg using python setup.py install. By far the most common pitfall of distributing your app in this way is that it requires a MANIFEST.in file when packaging your application in order for it to include static assets. python setup.py develop runs the application out of the directory instead, and does not suffer from that problem. I expect that if you unzip your egg file you will not find your templates inside.

Try add in file MANIFEST.in the extesion files.

recursive-include project *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml *.jinja2
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!