{# Renders Bokeh models into a basic .html file. :param title: value for ```` tags :type title: str :param plot_resources: typically the output of RESOURCES :type plot_resources: str :param plot_script: typically the output of PLOT_SCRIPT :type plot_script: str Users can customize the file output by providing their own Jinja2 template that accepts these same parameters. #} {% from macros import embed %} <!DOCTYPE html> <html lang="en"> {% block head %} <head> {% block inner_head %} <meta charset="utf-8"> <title>{% block title %}{{ title | e if title else "Bokeh Plot" }}{% endblock %} {% block preamble -%}{%- endblock %} {% block resources %} {% block css_resources -%} {{- bokeh_css if bokeh_css }} {%- endblock css_resources %} {% block js_resources -%} {{ bokeh_js if bokeh_js }} {%- endblock js_resources %} {% endblock resources %} {% block postamble %}{% endblock %} {% endblock inner_head %} {% endblock head%} {% block body %} {% block inner_body %} {% block contents %} {% for doc in docs %} {{ embed(doc) if doc.elementid }} {%- for root in doc.roots %} {% block root scoped %} {{ embed(root) }} {% endblock %} {% endfor %} {% endfor %} {% endblock contents %} {{ plot_script | indent(4) }} {% endblock inner_body %} {% endblock body%}