https://pypi.python.org/pypi/django-twitter-bootstrap/3.0.0に従って、Twitter ブートストラップを自分の Web サイトに含めています。しかし、テストを行ったところ、期待した結果が得られませんでした。ブートストラップ Web サイトにアクセスして、自分のページに含めることができるもののいくつかをテストしましたが、表示されません。この問題で私を助けてください! ありがとうございました!
これが私のHTMLファイルです。
<!DOCTYPE html>
<html>
<body>
<div class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<a href="#" class="btn">Close</a>
<a href="#" class="btn btn-primary">Save changes</a>
</div>
</div>
</body>
</html>
これらの部分を settings.py に追加しました。
INSTALLED_APPS = (
...,
...,
'registration',
'twitter_bootstrap',
'pipeline',
'homepage',
)
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
PIPELINE_COMPILERS = ( # used for compiling LESS files
'pipeline.compilers.less.LessCompiler',
)
PIPELINE_CSS = {
'bootstrap': {
'source_filenames': (
'less/bootstrap.less',
),
'output_filename': 'css/b.css',
'extra_context': {
'media': 'screen,projection',
},
},
}
PIPELINE_JS = {
'bootstrap': {
'source_filenames': (
'js/transition.js',
'js/modal.js',
'js/dropdown.js',
'js/scrollspy.js',
'js/tab.js',
'js/tooltip.js',
'js/popover.js',
'js/alert.js',
'js/button.js',
'js/collapse.js',
'js/carousel.js',
'js/affix.js',
),
'output_filename': 'js/b.js',
},
'application': {
'source_filenames': (
'js/holder.js',
'js/application.js',
),
'output_filename': 'js/a.js',
}
}