Tornado 6.5 Documentation
raises an exception, Tornado will call RequestHandler.write_error to generate an error page. tornado.web.HTTPError can be used to generate a specified status code; all other exceptions return a 500 status must use e.g. traceback.format_exception instead of traceback.format_exc). It is also possible to generate an error page from regular handler methods instead of write_error by calling set_status, writing application: application = tornado.web.Application([ (r"/", MainHandler), ], cookie_secret="__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__") Signed cookies contain the encoded value of the cookie in addition0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
raises an exception, Tornado will call RequestHandler.write_error to generate an error page. tornado.web.HTTPError can be used to generate a specified status code; all other exceptions return a 500 status [https://docs.python.org/3/library/traceback.html#traceback.format_exc]). It is also possible to generate an error page from regular handler methods instead of write_error by calling set_status, writing application: application = tornado.web.Application([ (r"/", MainHandler), ], cookie_secret="__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__") Signed cookies contain the encoded value of the cookie in addition0 码力 | 437 页 | 405.14 KB | 2 月前3
共 2 条
- 1
相关搜索词