其中一些包可以用 Less(语言)编写你的 CSS,并自动编译它们。此外,有些可能会添加资产的压缩和串联。
由于 Bootstrap 只不过是一堆 CSS 和 Javascript 文件(而且我不使用 Less),因此我所需要的只是表单集成,这很容易通过以下方式实现:
注意:这是我自己的代码的一个非常具体的例子,但你明白了。
<div class="row">
<div class="span6 offset3">
<form id="form-history" class="form-horizontal text-center"
action="/somepath/" method="post">
<fieldset>
<legend><h3>History</h3></legend>
{% for field in form %}
<div class="row">
<div class="span3">{{ field.label }}</div>
<div class="span3">{{ field }}</div>
</div>
{% endfor %}
<div class="row pull-right">
<button class="btn btn-primary btn-large" type="submit">
<i class="icon-ok icon-white"></i> Find
</button>
</div>
</fieldset>
</form>