0

我无法渲染某人发送给我的 python 应用程序。

设置.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 作为模板......

谢谢

4

1 回答 1

0

django-static使用pip或安装easy_install

pip install django-static

或者

easy_install django-static.

如果您遇到任何问题,您可以在此处查看配置说明。

https://github.com/peterbe/django-static

于 2014-05-08T10:35:55.103 回答