django的twitter引导静态文件
django-staticfiles-bootstrap的Python项目详细描述
在Django应用程序中轻松包含Twitter引导程序
安装
pip install django-staticfiles-bootstrap
确保Django项目配置为使用静态文件,然后将其添加到已安装的应用程序中
INSTALLED_APPS += [‘django-staticfiles-bootstrap’,]
用法
您可以在模板中以两种不同的方式使用此功能
###静态URL
<link href=”{{ STATIC_URL }}bootstrap/css/bootstrap.css” rel=”stylesheet”> <script src=”{{ STATIC_URL }}bootstrap/js/bootstrap.js”></script>
###静态模板标记
{% load static from staticfiles %} <link href=”{% static “bootstrap/css/bootstrap.min.css” %}” rel=”stylesheet”>
插件
如果您想使用javascript插件,就需要jquery。为此,我建议使用django staticfiles jquery。
代码美化需要谷歌代码美化。为此,我建议django staticfiles谷歌代码美化。