flask多请求方式处理

@app.route('/', methods=['GET', 'POST'])
def index():
    if request.method == 'GET':
          return render_template('index.html', email=session.get('email', ''))
       return redirect(url_for('index'))

posted @ 2022-04-29 15:51  啦啦la  阅读(140)  评论(0编辑  收藏  举报