1
回答
flask url_for的问题
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   
@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 函数时,里面的参数要怎么填?

举报
顶部