私のウェブサイトに設定されていないブートストラップデザイン、settings.pyブートストラップリンクが正しくありません
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR,'bootflat.github.io'), ]
で
<html lang="ja">
<head>
<meta charset="utf-8">
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="/static/index.css">
<link rel="stylesheet" href="/static/bootflat/css/bootflat.min.css">
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<script src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
</head>
・
・
私はHREFをクリック= "/ static/css/bootstrap.min.css "、404エラーが発生します。 のディレクトリ構造は、ブートストラップデザインがset.Whatない理由を私は知らない、私は私が正しくSTATIC_URLを設定すると思います
-PythonServer
-PythonServer
-logic
-static
-index.css
-templates
-index.html
-boolflat.github.io
-bower_components
ようなもので、私はこの問題を解決する必要がありますどのように?私のコードで間違っていますか?
サイドノートでは、決して静的ファイルのパスをハードコードするべきではありません。代わりに、 '{%static 'path/to/staticfiles'%}'を使用してください。 – jape