我正在修改cookiecutter瓶的應用程序。我目前正在試圖添加一個日期選擇器到一個頁面。我找到了https://eonasdan.github.io/bootstrap-datetimepicker/。這個cookiecutter使用flask-assets來管理項目資產。
我通過bower安裝了它,但刪除了bower中的引導組件,因爲我已經在我的靜態文件中引導了它。當我運行我的個人資料頁我看到顯示出來,但缺少組件的DateTimePicker:
<div class="form-group">
<div class="row">
<div class="col-md-8">
<div id="datetimepicker12"></div>
</div>
</div>
</div>
<script type="text/javascript">
$(function() {
$('#datetimepicker12').datetimepicker({
inline: true,
sideBySide: true
});
});
</script>
當我看在控制檯中我看到:
但在頂部屏幕截圖中的文件似乎在場。我究竟做錯了什麼?
編輯:
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /users/profile HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /static/libs/font-awesome4/css/font-awesome.min.css HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /static/libs/bootstrap/dist/css/spacelab/bootstrap.css HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /static/bower_components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /static/css/style.css HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /static/css/home.css HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /static/libs/jQuery/dist/jquery.js HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /static/libs/bootstrap/dist/js/bootstrap.js HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /static/bower_components/moment/min/moment.min.js HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /static/bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /static/js/plugins.js HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /_debug_toolbar/static/js/jquery.js HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /_debug_toolbar/static/js/jquery.tablesorter.js HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:12] "GET /_debug_toolbar/static/js/toolbar.js HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:13] "GET /_debug_toolbar/static/css/toolbar.css?0.2746632904869951 HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:14] "GET /static/libs/bootstrap/dist/css/fonts/glyphicons-halflings-regular.woff2 HTTP/1.1" 404 -
127.0.0.1 - - [16/Mar/2016 11:22:14] "GET /_debug_toolbar/static/img/tick.png HTTP/1.1" 200 -
127.0.0.1 - - [16/Mar/2016 11:22:14] "GET /static/libs/bootstrap/dist/css/fonts/glyphicons-halflings-regular.woff HTTP/1.1" 404 -
127.0.0.1 - - [16/Mar/2016 11:22:14] "GET /static/libs/bootstrap/dist/css/fonts/glyphicons-halflings-regular.ttf HTTP/1.1" 404 -
127.0.0.1 - - [16/Mar/2016 11:22:14] "GET /favicon.ico HTTP/1.1" 200 -
代碼是否很難找到bootstrap.css文件?你能看到那條路嗎? – Jeff
當你從模板撥打電話?您的通話路徑錯誤。你正在從本地主機上工作? – JMF
評論@ user61629 – JMF