Pre-populate HTML form table from database using Django

前端 未结 3 1389
太阳男子
太阳男子 2021-02-11 02:24

I have a class-based view (IndexView at views.py) that shows a table with all the data stored in the database. This view is rendered in index.html<

3条回答
  •  花落未央
    2021-02-11 03:11

    One thing you can do is iterate through the item list, and set the value attribute of the input tag of each field to form.field_name.value

提交回复
热议问题