当我使用post方法向python提交一次时,我的网页会多次呈现 请在这里找到我的问题的解决方案,我使用python和html

当我使用post方法向python提交一次时,我的网页会多次呈现 请在这里找到我的问题的解决方案,我使用python和html,python,html,flask,Python,Html,Flask,从你给出的情况来看,这是我能想到的唯一解决办法。如果这不是你想要的,请随意提问,谢谢 @app.response("/process" , methods=['POST']) def process(): return render_template('index.html') 来自Flask导入请求 @app.response(“/process”,方法=['POST'])) def进程(): 如果(request.method==“POST”): 其他: 返回渲染模板('index

从你给出的情况来看,这是我能想到的唯一解决办法。如果这不是你想要的,请随意提问,谢谢

@app.response("/process" , methods=['POST'])
def process():
    return render_template('index.html')
来自Flask导入请求
@app.response(“/process”,方法=['POST']))
def进程():
如果(request.method==“POST”):
其他:
返回渲染模板('index.html')

需要更多解释。
from Flask import request

@app.response("/process" , methods=['POST'])
def process():
    if (request.method == "POST"):
        <enter code here>
    else:
        return render_template('index.html')