从formset获取特定字段

Ste*_*en 2 django django-templates

对于文档,我可以显示如下的formset

<table>
    {{ formset }}
</table>
Run Code Online (Sandbox Code Playgroud)

但是,如果我想手动格式化布局怎么办?就像它为ModelForms做的一样?我怎样才能做到这一点?

piy*_*yer 5

你可以做form.field名称Example: {{ form.username }},django-display表单模板