1
回答
flask url_for的问题
注册华为云得mate10,2.9折抢先购!>>>   
@app.route('/album/<slug>')
def show_album(slug):
    r= get_root_dirs_files()
    try:
        r = r[slug]
    except:
        return 'Album Not Existing'

    return render_template("albums.html",  dicts=r)


@app.route("/delete/<path:object_name>")
def delete(object_name):
    obj = storage.get(object_name)
    print obj
    remove('./static/uploads/Pictures/%s' % (obj.name))
    return redirect(url_for('show_album'???))


delete函数中,url_for show_album 函数时,里面的参数要怎么填?

举报
顶部