我的表格
'warranty': forms.CheckboxSelectMultiple(attrs={'class': 'list-inline'}),
我的模板
<div class="col-md-12" style="height: 50px; width: 900px;">
<label class="list-inline col-xs-6" for="{{form2.warranty.name}}" style="width: 140px; padding-right: 20px;padding-left: 20px;">{{ form2.warranty.label }}</label>
{{ form2.warranty}}
</div>
结果
<ul id=id_class>
<li class="list-inline id="id_warranty_1" name="warranty">opcion 1</li>
<li class="list-inline id="id_warranty_2" name="warranty">opcion 2</li>
<li class="list-inline id="id_warranty_3" name="warranty">opcion 3</li>
</ul>
但我需要
上的课程列表<ul class="MYCLASS" id=id_class>
<li class="list-inline id="id_warranty_1" name="warranty">opcion 1</li>
<li class="list-inline id="id_warranty_2" name="warranty">opcion 2</li>
<li class="list-inline id="id_warranty_3" name="warranty">opcion 3</li>
</ul>
问题实际
期望的结果