小弟新手,html中引入css报错
{% extends 'web/base.html' %}
{% block js %}
{% load staticfiles %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}blog/style.css" />
{# <script type="text/javascript" src="{{ STATIC_URL }}js/jquery-1.8.3.min.js"></script>#}
{% endblock %}
setting部分内容如下:
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_URL = '/static/'
# add by slider
TEMPLATE_DIRS = (
os.path.abspath(os.path.join(BASE_DIR, 'templates')),
)
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
MEDIA_URL = '/media/'
ADMIN_MEDIA_PREFIX = '/static/admin/'
STATIC_ROOT = os.path.join(BASE_DIR, "static")
STATIC_URL = "/static/"
TINYMCE_DEFAULT_CONFIG = {
'theme': 'advanced',
'theme_advanced_toolbar_location' : 'top',
'theme_advanced_toolbar_align' : 'left',
'width': 600,
'height': 400,
}
报错信息如下:
[13/Dec/2014 09:32:56] "GET /blog/ HTTP/1.1" 200 1208
[13/Dec/2014 09:32:56] "GET /blog/style.css HTTP/1.1" 404 2585
[13/Dec/2014 09:32:56] "GET /static/blog/style.css HTTP/1.1" 404 1646