📜  烧瓶中的按钮 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:03.826000             🧑  作者: Mango

代码示例1


def contact():
    if request.method == 'POST':
        if request.form['submit_button'] == 'Do Something':
            pass # do something
        elif request.form['submit_button'] == 'Do Something Else':
            pass # do something else
        else:
            pass # unknown
    elif request.method == 'GET':
        return render_template('contact.html', form=form)