擅长:python、mysql、java
<blockquote>
<p>I have a model in which I want to render specific fields multiple times depending on how much the user wants to fill in, while rest of the model fields remain the same. </p>
</blockquote>
<p>这不是它的工作原理。数据库字段是原子的-它们只包含一个值。如果需要不确定数量的值,可以使用具有一对多(外键)或多对多关系的相关模型。你想要一个“旅游日期”和一个“建筑”模型,在“旅游”中既有外键也有很多关系。然后,您将能够为这些相关模型使用表单集</p>