我正在使用清晰的表单和 bootstrap3,我想在同一行中显示 selectdatewidget 选择,如下所示:
<div class="form-group">
<label for="id_startdate_day" class="control-label col-lg-2">
Startdate
</label>
<div class="col-lg-10">
<div class="row">
<div class="col-lg-3">
<select class="form-control" id="id_startdate_day" name="startdate_day">
<option value="1">1</option><option value="2">2</option>
</select>
</div>
<div class="col-lg-3">
<select class="form-control" id="id_startdate_month" name="startdate_month">
<option value="1">jan</option><option value="2">feb</option>
</select>
</div>
<div class="col-lg-3">
<select class="form-control" id="id_startdate_year" name="startdate_year">
<option value="2013" selected="selected">2013</option><option value="2014">2014</option>
</select>
</div>
</div>
</div>
</div>
我试图为该领域制作自己的模板,但我似乎无法“拆分”{% crispy_field field %}
我试过了{% crispy_field field.1 %}
{% crispy_field field.2 %}
{% crispy_field field.3 %}
,但我得到了这个错误:Failed lookup for key [1]
有人知道如何“拆分”crispy_field 字段吗?还是有其他解决方案?