0
这是我的项目设置的页面Django的静态CSS没有被发现(发展)
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_URL = '/static/'
STATIC_ROOT = 'staticfiles'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, '../static'),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
HTML文件
{% load staticfiles %}
<link href="{% static "css/bootstrap.min.css" %}" rel="stylesheet">
<link href="{% static "css/scrolling-nav.css" %}" rel="stylesheet">
这里是我的项目目录布局:
https://app.box.com/s/zurax1ytxt71jhi8ieaq
我以为我已经完全设置了这一点,但是当我的模板html呈现时,CSS/JS似乎不起作用。有任何想法吗?
那你的HTTP服务器配置? – elmonkeylp 2014-09-18 22:00:57