0. 项目结构

 

 

 

 

1. settings.py

STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "static"),
)

 

 

 

 

2. html中导入本地存储的bootstrap.css

<head>
  <link rel="stylesheet" href="/static/bootstrap-3.3.7-dist/bootstrap-3.3.7-dist/css/bootstrap.css">
</head>

注意:路径前面要有/ :   /statci/

 

 

 

 

 posted on 2020-05-23 22:14  墨语i  阅读(132)  评论(0)    收藏  举报