Web 框架¶
tornado.web
—RequestHandler
和Application
类- 线程安全注意事项
- 请求处理程序
RequestHandler
- 入口点
- 输入
RequestHandler.get_argument()
RequestHandler.get_arguments()
RequestHandler.get_query_argument()
RequestHandler.get_query_arguments()
RequestHandler.get_body_argument()
RequestHandler.get_body_arguments()
RequestHandler.decode_argument()
RequestHandler.request
RequestHandler.path_args
RequestHandler.path_kwargs
RequestHandler.data_received()
- 输出
RequestHandler.set_status()
RequestHandler.set_header()
RequestHandler.add_header()
RequestHandler.clear_header()
RequestHandler.set_default_headers()
RequestHandler.write()
RequestHandler.flush()
RequestHandler.finish()
RequestHandler.render()
RequestHandler.render_string()
RequestHandler.get_template_namespace()
RequestHandler.redirect()
RequestHandler.send_error()
RequestHandler.write_error()
RequestHandler.clear()
RequestHandler.render_linked_js()
RequestHandler.render_embed_js()
RequestHandler.render_linked_css()
RequestHandler.render_embed_css()
- Cookie
RequestHandler.cookies
RequestHandler.get_cookie()
RequestHandler.set_cookie()
RequestHandler.clear_cookie()
RequestHandler.clear_all_cookies()
RequestHandler.get_signed_cookie()
RequestHandler.get_signed_cookie_key_version()
RequestHandler.set_signed_cookie()
RequestHandler.get_secure_cookie()
RequestHandler.get_secure_cookie_key_version()
RequestHandler.set_secure_cookie()
RequestHandler.create_signed_value()
MIN_SUPPORTED_SIGNED_VALUE_VERSION
MAX_SUPPORTED_SIGNED_VALUE_VERSION
DEFAULT_SIGNED_VALUE_VERSION
DEFAULT_SIGNED_VALUE_MIN_VERSION
- 其他
RequestHandler.application
RequestHandler.check_etag_header()
RequestHandler.check_xsrf_cookie()
RequestHandler.compute_etag()
RequestHandler.create_template_loader()
RequestHandler.current_user
RequestHandler.detach()
RequestHandler.get_browser_locale()
RequestHandler.get_current_user()
RequestHandler.get_login_url()
RequestHandler.get_status()
RequestHandler.get_template_path()
RequestHandler.get_user_locale()
RequestHandler.locale
RequestHandler.log_exception()
RequestHandler.on_connection_close()
RequestHandler.require_setting()
RequestHandler.reverse_url()
RequestHandler.set_etag_header()
RequestHandler.settings
RequestHandler.static_url()
RequestHandler.xsrf_form_html()
RequestHandler.xsrf_token
- 应用程序配置
- 装饰器
- 其他一切
HTTPError
Finish
MissingArgumentError
UIModule
ErrorHandler
FallbackHandler
RedirectHandler
StaticFileHandler
StaticFileHandler.compute_etag()
StaticFileHandler.set_headers()
StaticFileHandler.should_return_304()
StaticFileHandler.get_absolute_path()
StaticFileHandler.validate_absolute_path()
StaticFileHandler.get_content()
StaticFileHandler.get_content_version()
StaticFileHandler.get_content_size()
StaticFileHandler.get_modified_time()
StaticFileHandler.get_content_type()
StaticFileHandler.set_extra_headers()
StaticFileHandler.get_cache_time()
StaticFileHandler.make_static_url()
StaticFileHandler.parse_url_path()
StaticFileHandler.get_version()
tornado.template
— 灵活的输出生成tornado.routing
— 基本的路由实现tornado.escape
— 转义和字符串操作tornado.locale
— 国际化支持tornado.websocket
— 与浏览器的双向通信