Cannot replace the document tile in tempates

I am using my template file and tried to redefine the tile as follows:

<title>{% block title %}My APP{% endblock %}</title>

But, the brower always shows the title as ‘Bokeh Application’, which is the DEFAULT_TITLE from bokeh.min.js.

Is it a bug?

Not sure if this helps, but I’ve set mine up like so:

template = Template('''<!DOCTYPE html>
        <html lang="en">
                <meta charset="utf-8">
                {{ resources }}
                {{ script }}       
                {{ div }}

And it works just fine.

Setting curdoc().title my also be an option, depending on how you arrange the template.

curdoc().title works. But, replacing the title in templates does not. I searched some code bokeh.min.js, which always(?) replace my title with DEFAULT_TITLE.

It might be possible to make it work so that if curdoc().title is None, then it will not override anything in the template. In fact, it might already work this way. But I think if curdoc().title is set to a (non-None) value, then it will always have to take precedence (that is what it having a value signifies).

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.