This docs on this page refers to a PREVIOUS VERSION. For the latest stable release, go to https://docs.bokeh.org/

Archived docs for versions <= 1.0.4 have had to be modified from their original published configuration, and may be missing some features (e.g. source listing)

All users are encourage to update to version 1.1 or later, as soon as they are able.

bokeh.server.views.doc_handler — Bokeh 0.12.14 documentation

Source code for bokeh.server.views.doc_handler

''' Provide a request handler that returns a page displaying a document.

'''
from __future__ import absolute_import, print_function

import logging
log = logging.getLogger(__name__)

from tornado import gen

from bokeh.embed.server import server_html_page_for_session

from .session_handler import SessionHandler

[docs]class DocHandler(SessionHandler): ''' Implements a custom Tornado handler for document display page ''' @gen.coroutine def get(self, *args, **kwargs): session = yield self.get_session() page = server_html_page_for_session(session.id, self.application.resources(), title=session.document.title, template=session.document.template, template_variables=session.document.template_variables) self.set_header("Content-Type", 'text/html') self.write(page)