解决方法:
1:在settings.py中加入
STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static/'), )
并确保DEBUG=True
2:在html中加入
{% load staticfiles %}
并删除
<!DOCTYPE html>
然后保存,就可以加载了
解决方法:
1:在settings.py中加入
STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static/'), )
并确保DEBUG=True
2:在html中加入
{% load staticfiles %}
并删除
<!DOCTYPE html>
然后保存,就可以加载了