想要在tornado裏面使用reverse_url來反查url,實現flask裏面的url_for的功能那就要在路由配置裏面使用web.URLSpec函數添加路由 python
[web.URLSpec(r"/",IndexHandler,name="index")]
reverse_url("index")