Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否有一种方法可以在不使用 for 循环的情况下在 Django 中引用表单集的各个表单。
这是所有文档搜索结果指向的内容:
{% for form in formset %} {{ form }} {% endfor %}
我想知道是否有办法这样做:
{{ form[0] }} {{ form[1] }} {{ form[2] }}
我找不到任何可以做到的东西,并开始认为这是不可能的。