我在渲染别人发给我的python应用程序时遇到了麻烦。
settings.py:
STATIC_URL = '/static/'
DJANGO_STATIC = True
DJANGO_STATIC_NAME_PREFIX = '/static'
DJANGO_STATIC_SAVE_PREFIX = '/tmp/cache-archinot
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_static',
)当我运行服务器时,我得到:
ImportError: No module named django_static我从以下地址下载了压缩包
https://github.com/peterbe/django-static但我不知道该把我下载的东西放在哪里。请帮帮我,我是python、django等的新手。哦,最后,如果我注释这行
#'django_static',然后服务器运行,但我无法呈现任何页面,因为他们使用django_static作为模板……
谢谢
发布于 2014-05-08 18:35:55
使用pip或easy_install安装django-static。
pip install django-static
或
easy_install django-static。
如果您遇到任何问题,您可以在此处查看配置说明。
https://stackoverflow.com/questions/22136227
复制相似问题