Auto-generate form fields for a Form in django

后端 未结 3 1594
温柔的废话
温柔的废话 2020-12-28 22:14

I have some models and I want to generate a multi-selection form from this data. So the form would contain an entry for each category and the choices would be the skills in

3条回答
  •  我在风中等你
    2020-12-28 22:42

    What you want is a Formset. This will give you a set of rows, each of which maps to a specific Skill.

    See the Formset documentation and the page specifically on generating formsets for models.

提交回复
热议问题