1
回答
flask url_for的问题
终于搞明白,存储TCO原来是这样算的>>>   
@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 函数时,里面的参数要怎么填?

举报
顶部