摘要: **变量规则**在URL部分添加变量使用``就可以了。 @app.route('/user/') def show_user_profile(username): # show the user profile for that user return 'Us... 阅读全文
posted @ 2015-04-17 18:23 小米飞猫 阅读(419) 评论(0) 推荐(0) 编辑
摘要: **调试模式**`DEBUG` 模式支持代码修改后服务自动加载,并且发生错误,除了打印错误信息,还提供一个调试器,虽然官网提到修改代码后,会自动重新加载服务,不过修改错了,服务该挂还是挂,还得需要手动重新启动。两种方式开启调试模式 app.debug = Ture app.run()或者... 阅读全文
posted @ 2015-04-17 00:06 小米飞猫 阅读(532) 评论(0) 推荐(0) 编辑