且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用Flask将POST传递到另一个URL

更新时间:2023-01-08 09:56:23

form 中的 action 错误.您正在将表单发送到索引页面.您可以像这样编辑它:

your action from form is wrong.you are sending the form to the index page. you could edit it like:

<form action="{{ url_for('success') }}" method="post">

这样,您的表格将被发送到成功方法.

this way, your form will be sent to the success method.