flask url_for的问题

@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 函数时,里面的参数要怎么填?


哔哔one
浏览 217回答 1
1回答

萧十郎

url_for('show_album', slug=***)
打开App,查看更多内容
随时随地看视频慕课网APP