本文整理汇总了Python中tornado.web.Application.workspace_manager方法的典型用法代码示例。如果您正苦于以下问题:Python Application.workspace_manager方法的具体用法?Python Application.workspace_manager怎么用?Python Application.workspace_manager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tornado.web.Application
的用法示例。
在下文中一共展示了Application.workspace_manager方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_application
# 需要导入模块: from tornado.web import Application [as 别名]
# 或者: from tornado.web.Application import workspace_manager [as 别名]
def create_application():
application = Application([
('/_static/(.*)', StaticFileHandler, {'path': FigureManagerWebAgg.get_static_file_path()}),
('/mpl.js', MplJavaScriptHandler),
(url_pattern('/mpl/download/{{base_dir}}/{{figure_id}}/{{format_name}}'), MplDownloadHandler),
(url_pattern('/mpl/figures/{{base_dir}}/{{figure_id}}'), MplWebSocketHandler),
(url_pattern('/'), WebAPIVersionHandler),
(url_pattern('/exit'), WebAPIExitHandler),
(url_pattern('/api'), JsonRpcWebSocketHandler, dict(
service_factory=service_factory,
validation_exception_class=ValidationError,
report_defer_period=WEBAPI_PROGRESS_DEFER_PERIOD)
),
(url_pattern('/ws/res/plot/{{base_dir}}/{{res_name}}'), ResourcePlotHandler),
(url_pattern('/ws/res/geojson/{{base_dir}}/{{res_id}}'), ResFeatureCollectionHandler),
(url_pattern('/ws/res/geojson/{{base_dir}}/{{res_id}}/{{feature_index}}'), ResFeatureHandler),
(url_pattern('/ws/res/csv/{{base_dir}}/{{res_id}}'), ResVarCsvHandler),
(url_pattern('/ws/res/html/{{base_dir}}/{{res_id}}'), ResVarHtmlHandler),
(url_pattern('/ws/res/tile/{{base_dir}}/{{res_id}}/{{z}}/{{y}}/{{x}}.png'), ResVarTileHandler),
(url_pattern('/ws/ne2/tile/{{z}}/{{y}}/{{x}}.jpg'), NE2Handler),
(url_pattern('/ws/countries'), CountriesGeoJSONHandler),
])
application.workspace_manager = FSWorkspaceManager()
return application