首页 > 解决方案 > 我们可以在 Django 框架中嵌套 HTML 表单吗?

问题描述

<form action="#" method ="POST>
    <input …&gt;
    <input …&gt;
        <form action ="#" method="POST>
             <input …&gt;
             <input …&gt;
             <button type = "submit" name = "inner">..
        </form>
    <button type = "submit" name = "outer">..
</form>

我们可以使用这样的嵌套形式提交给单个函数views.py吗?

在此处输入图像描述

第一个表单在 CSV 中搜索记录。然后下一个表单在单击“保存”时保存带有附加数据的信息。

标签: pythonhtmldjango

解决方案


推荐阅读