Bokeh, Django views and https

Hi Everybody,
I am not an advanced developer but I managed very well to implement bokeh plots in my Django views following this tutorial : python 2.7 - how to embed standalone bokeh graphs into django templates - Stack Overflow

So everything works fine when I run my Django server in dev mode with an http address, and when I run the production mode with https then the plots don’t show.

Anyone knows why?

Thanks a lot fo this amazing library

Did you use “http” URLs for the BojehJS CDN links as done in that answer? Browsers will refuse to execute scripts loaded from insecure URLs in secure pages. I would advise to just use “https” locations for BokehJS resources everywhere, all the time.

Wonderful!

That was the problem indeed.

thank you so much. made my day :slight_smile:

1 Like