@app.route('/this/is/the/url')
def some_exposed_func():
return render_template("data.html")
如何从 some_exposed_func 句柄中获取 '/this/is/the/url'?
print 'The func URL is: %s' % get_flask_route_url(some_exposed_func)
最佳答案
找到我自己:url_for() 就是答案
关于python - Flask - 从函数获取路由 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13447420/