Pre-populate HTML form table from database using Django

前端 未结 3 1358
醉话见心
醉话见心 2021-02-11 02:26

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:00

    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

提交回复
热议问题