URL重定向


使用redirect重定向URL

@app.route('/manage/')
def manage():
    user = request.args.get('user')
    if user:
        return user
    else:
        return redirect(url_for('login'))


@app.route('/login/')
def login():
    return '登录页'

results matching ""

    No results matching ""