Python 3.x 我可以重用数据表中显示的数据吗?

Python 3.x 我可以重用数据表中显示的数据吗?,python-3.x,flask,datatables,Python 3.x,Flask,Datatables,我有一个flask应用程序,它调用我的API来提取一些记录。然后,我将json响应传递给json2html,然后传递给datatables以创建一个表。我计划在我的表上创建一个带有行选择选项的按钮 我的问题是,我可以使用表中的数据在另一个页面上填充表单吗?实际上,我希望能够选择行,单击“更新”按钮,它将带我进入一个表单页面,其中包含从行值填充的表单值。因此,如果单击第1行,我的表单页面将填充 id = 6a3d7026-43f3-67zt-9211-99dfc6fee82e name = tes

我有一个flask应用程序,它调用我的API来提取一些记录。然后,我将json响应传递给json2html,然后传递给datatables以创建一个表。我计划在我的表上创建一个带有行选择选项的按钮

我的问题是,我可以使用表中的数据在另一个页面上填充表单吗?实际上,我希望能够选择行,单击“更新”按钮,它将带我进入一个表单页面,其中包含从行值填充的表单值。因此,如果单击第1行,我的表单页面将填充

id = 6a3d7026-43f3-67zt-9211-99dfc6fee82e
name = test
description = test
number = 20934120
....some other fields not from the table
我不知道没有数据库我怎么能做到这一点。不是寻找完整的解决方案,只是一些关于最佳方法的指针或一些好的文档。谢谢

示例响应

内部app.py

内部更新.html

{'count': 2, 'total': 2, 
'data': [
{'id': '6a3d7026-43f3-67zt-9211-99dfc6fee82e', 
 'name': 'test',  
 'properties': {'Description#en': 'test', 'Number#en': '20934120'},
{'id': '6a3d7026-43f3-67zt-9211-99hdttbhh4ed', 
 'name': 'test',  
 'properties': {'Description#en': 'test', 'Number#en': '20934121'}}], 
 ....REQUEST
    response = requests.request("GET", url, headers=headers, data=payload)
    data = json.loads(response.text)
    output = json2html.convert(json = data, table_attributes="id=\"table1\" class=\"table1\")
    return render_template("update.html", data=data, output=output)
{{output|safe}}

<script>
$(document).ready(function() {
    $('#table1').DataTable( {
        "searching": false,
         dom: 'Bfrtip',
         buttons: [
             {
                text: 'Update',
                action: function ( e, dt, node, config ) {
                    alert( 'This is my button' );
                }
             }
         ]

    } );
} );
</script>