[英]Error: No module named staticfiles in django 1.3.1 + python 2.6? what's wrong
I didn't worked on the django project for somedays and now I return and I can't work on it.我有几天没有在 django 项目上工作,现在我回来了,我无法继续工作。 When I debug or run in eclipse aptana I get the "Error: No module named staticfiles" error.
当我在 eclipse aptana 中调试或运行时,出现“错误:没有名为静态文件的模块”错误。
But if I delete the "'django.contrib.staticfiles'," string in the "INSTALLED_APPS" from settings.py everything works fine but I have no access to the static files, as expected..但是,如果我从 settings.py 中删除“INSTALLED_APPS”中的“'django.contrib.staticfiles'”字符串,一切正常,但我无法访问静态文件,正如预期的那样..
In those days I have installed Google app engine + python 2.5;那些天我安装了谷歌应用引擎+python 2.5; can this be the problem and how to solve?
这可能是问题以及如何解决?
thank you very much*非常感谢你*
Here are the steps I'd take to find out the problem:以下是我为找出问题而采取的步骤:
Here is how I would avoid this in future:以下是我将来避免这种情况的方法:
[1] http://pypi.python.org/pypi/virtualenv [1] http://pypi.python.org/pypi/virtualenv
[2] http://pypi.python.org/pypi/pip [2] http://pypi.python.org/pypi/pip
NB pip and easy_install are automatically installed into your new virtualenv NB pip 和 easy_install 会自动安装到你的新 virtualenv 中
在新版Django中使用{% load static %}
代替{% load staticfiles %}
,加载静态文件的语法发生了变化
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.