deals_formset_factory = modelformset_factory(Deal, form=DealForm, extra=1)
formset = deals_formset_factory(queryset=query, prefix='deals')
{% for fs in formset.forms %}
{{ fs.id }}
{% endfor %}
在遍历表单集的表单时,是否可以找出哪个表单包含实例数据以及哪个表单是多余的,因此是空的?