我在表中列出了模型形式。如何更改表格的外观,以使左侧有两列-字段职责(文本字段),而在右侧的其他日期输入字段下方则有两列?或者不使用引导程序上的表来执行此操作。
表格外观
templates.html
<table class="table table-responsive">
{{ project_form.management_form }}
{% for form in project_form.forms %}
{% if forloop.first %}
<thead>
<tr>
{% for field in form.visible_fields %}
<th>{{ field.label|capfirst }}</th>
{% endfor %}
</tr>
</thead>
{% endif %}
<tr class="{% cycle 'row1' 'row2' %} formset_row">
{% for field in form.visible_fields %}
<td>
{# Include the hidden fields in the form #}
{% if forloop.first %}
{% for hidden in form.hidden_fields %}
{{ hidden }}
{% endfor %}
{% endif %}
{{ field.errors.as_ul }}
{{ field }}
</td>
{% endfor %}
</tr>
{% endfor %}
</table>