☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Bokeh 1.3.4 - Problems trying to embend a widget with scritp, div in a Django page

Community Support
carvano
carvano

I’ve been using bokeh plots inside Django-generated web pages with no problems, but whenever I try to add a widget, nothing happens (not even an error message). For example the following code would produce the desired result if ‘cb’ were a bokeh plot, but nothing at all with ‘cb’ as widget:

Python/Bokeh:

from bokeh.embed import components
from bokeh.models.widgets import Button
from bokeh.layouts import Row

cb=Button(label=“Teste”)
layout=Row(cb)
script,div=components(layout,CDN)

CSS:

(with links to https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.3.4.min.js inside the script tag)

Django Template:

{{ div | safe }}
{{ script | safe }}


Any help is appreciated!

⌁   Link to post
carvano
carvano

Thanks for your answer. I could figure out the problem looking at the console log. I was loading the JS source for the widgets before the the bokeh source. Everything worked once I inverted the order.

Cheers.

⌁   Link to post

End of archived discussion · Replies are disabled