Source code for bokeh.server.views.autoload_js_handler
#-----------------------------------------------------------------------------# Copyright (c) Anaconda, Inc., and Bokeh Contributors.# All rights reserved.## The full license is in the file LICENSE.txt, distributed with this software.#-----------------------------------------------------------------------------''' Provide a request handler that returns a page displaying a document.'''#-----------------------------------------------------------------------------# Boilerplate#-----------------------------------------------------------------------------from__future__importannotationsimportlogging# isort:skiplog=logging.getLogger(__name__)#-----------------------------------------------------------------------------# Imports#-----------------------------------------------------------------------------# Standard library importsfromurllib.parseimporturlparse# Bokeh importsfrombokeh.core.templatesimportAUTOLOAD_JSfrombokeh.embed.bundleimportScript,bundle_for_objs_and_resourcesfrombokeh.embed.elementsimportscript_for_render_itemsfrombokeh.embed.utilimportRenderItem# Bokeh importsfrom.session_handlerimportSessionHandler#-----------------------------------------------------------------------------# Globals and constants#-----------------------------------------------------------------------------__all__=('AutoloadJsHandler',)#-----------------------------------------------------------------------------# General API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Dev API#-----------------------------------------------------------------------------
[docs]classAutoloadJsHandler(SessionHandler):''' Implements a custom Tornado handler for the autoload JS chunk '''