我想增加一个模板和一个单选按钮。请问我该怎么做?在
这是我的表格模板:
<table class="table table-striped">
<thead>
<tr>
{% for heading in headings %}
<th class="col-head-{{ fields|get_item:forloop.counter0 }}">{{ heading }}</th>
{% endfor %}
<th> </th> <!-- edit -->
<th> </th> <!-- delete -->
</tr>
</thead>
<tbody>
{% for item in objects %}
<tr class="row-clickable">
{% for field in fields %}
<td class="col-item-{{ field }}">
{% block cell %}
{{ item|get_item:field }}
{% endblock %}
</td>
{% endfor %}
<td class="col-icon col-icon-edit"><button type="button" class="btn btn-sm btn-default"><span class="glyphicon glyphicon-pencil"> </span></button></td>
<td class="col-icon col-icon-remove"><button type="button" class="btn btn-sm btn-default"><span class="glyphicon glyphicon-trash"> </span></button></td>
</tr>
{% empty %}
<tr>
<td colspan="{{ fields|length }}">Nothing yet to display.</td>
<td colspan="2"> </td>
</tr>
{% endfor %}
</tbody>
</table>
这是我的扩展表:
^{pr2}$如何向扩展表添加单选按钮。在
谢谢你的帮助
一种方法是使用从模型类中获取BooleanField()-class对象的窗体。在
或者,您可以使用Ajax单选按钮
^{pr2}$相关问题 更多 >
编程相关推荐