Running bokeh server and generating autoload_server

I have a django application that I mimicked from the “happiness” example (https://github.com/bokeh/bokeh-demos/tree/master/happiness), so basic charts are being served via script and autoload_server.

For more complicated visuals with animation and sever-callback I want to deploy them as bokeh apps and include as an iframe.

The problem I’m running into is running[ bokeh serve] allows my django app to run with and embedded bokeh plot, but not the bokeh app. And running [bokeh serve myapp.py] loads the bokeh app, but not django.

Is there any way to get these both running at the same time?

Thanks,

Jason

Jason,

Running apps from bokeh and embedding them in django works ok for me - I haven’t used an iframe with it, so it could be this that is causing the problem - you may need to make sure that your hosts and ports are correct on the iframe, and check if they are allowed on the bokeh server.

Can you share some examples from your code to help understand why it’s not working?

Additionally, it’s pretty easy to embed apps directly using bokeh server and django without using an iframe.

David

···

On Thursday, September 29, 2016 at 10:03:51 PM UTC+1, Jason Haddix wrote:

I have a django application that I mimicked from the “happiness” example (https://github.com/bokeh/bokeh-demos/tree/master/happiness), so basic charts are being served via script and autoload_server.

For more complicated visuals with animation and sever-callback I want to deploy them as bokeh apps and include as an iframe.

The problem I’m running into is running[ bokeh serve] allows my django app to run with and embedded bokeh plot, but not the bokeh app. And running [bokeh serve myapp.py] loads the bokeh app, but not django.

Is there any way to get these both running at the same time?

Thanks,

Jason

Hi David,

Thanks for replying. The problem I’m having is that I can’t seem to run both. Here is what I’m running to start Bokeh and DJango:

bokeh serve --log-level=debug --host:localhost:5006 --host:localhost:8001

This allows me to embed Bokeh scripts just fine through DJango, but if I try this:

bokeh serve mygraph.py --log-level=debug --host:localhost:5006 --host:localhost:8001

Then I can only run the “mygraph.py” Bokeh app. The Django app then says that it failed to connect to the bokeh server.

Am I doing something wrong here?

Thanks,

Jason

···

On Friday, September 30, 2016 at 9:10:19 AM UTC-5, David Pugh wrote:

Jason,

Running apps from bokeh and embedding them in django works ok for me - I haven’t used an iframe with it, so it could be this that is causing the problem - you may need to make sure that your hosts and ports are correct on the iframe, and check if they are allowed on the bokeh server.

Can you share some examples from your code to help understand why it’s not working?

Additionally, it’s pretty easy to embed apps directly using bokeh server and django without using an iframe.

David

On Thursday, September 29, 2016 at 10:03:51 PM UTC+1, Jason Haddix wrote:

I have a django application that I mimicked from the “happiness” example (https://github.com/bokeh/bokeh-demos/tree/master/happiness), so basic charts are being served via script and autoload_server.

For more complicated visuals with animation and sever-callback I want to deploy them as bokeh apps and include as an iframe.

The problem I’m running into is running[ bokeh serve] allows my django app to run with and embedded bokeh plot, but not the bokeh app. And running [bokeh serve myapp.py] loads the bokeh app, but not django.

Is there any way to get these both running at the same time?

Thanks,

Jason

If you are embedding the scripts directly you shouldn’t need the bokeh server but to serve the apps you need to include (at least on Windows):

–allow-websocket-origin=127.0.0.1:8000

In the bokeh serve command

bokeh serve mygraph.py --log-level=debug --host:localhost:5006 --host:localhost:8001 --allow-websocket-origin=127.0.0.1:8000

Hope this helps,

David

···

On 3 Oct 2016, at 14:05, Jason Haddix [email protected] wrote:

Hi David,

Thanks for replying. The problem I’m having is that I can’t seem to run both. Here is what I’m running to start Bokeh and DJango:

bokeh serve --log-level=debug --host:localhost:5006 --host:localhost:8001

This allows me to embed Bokeh scripts just fine through DJango, but if I try this:

bokeh serve mygraph.py --log-level=debug --host:localhost:5006 --host:localhost:8001

Then I can only run the “mygraph.py” Bokeh app. The Django app then says that it failed to connect to the bokeh server.

Am I doing something wrong here?

Thanks,

Jason

On Friday, September 30, 2016 at 9:10:19 AM UTC-5, David Pugh wrote:

Jason,

Running apps from bokeh and embedding them in django works ok for me - I haven’t used an iframe with it, so it could be this that is causing the problem - you may need to make sure that your hosts and ports are correct on the iframe, and check if they are allowed on the bokeh server.

Can you share some examples from your code to help understand why it’s not working?

Additionally, it’s pretty easy to embed apps directly using bokeh server and django without using an iframe.

David

On Thursday, September 29, 2016 at 10:03:51 PM UTC+1, Jason Haddix wrote:

I have a django application that I mimicked from the “happiness” example (https://github.com/bokeh/bokeh-demos/tree/master/happiness), so basic charts are being served via script and autoload_server.

For more complicated visuals with animation and sever-callback I want to deploy them as bokeh apps and include as an iframe.

The problem I’m running into is running[ bokeh serve] allows my django app to run with and embedded bokeh plot, but not the bokeh app. And running [bokeh serve myapp.py] loads the bokeh app, but not django.

Is there any way to get these both running at the same time?

Thanks,

Jason

You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/ZdTfasYhmDg/unsubscribe.

To unsubscribe from this group and all its topics, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/a726576f-78a2-484d-a4a6-b7cf7730124a%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

A combination of this answer and one for defining a proper autoload_server [ script = autoload_server(model=None, app_path="/apps/slider", url=“https://demo.bokehplots.com”) ] has everything working perfectly!!! Thanks!!

···

On Monday, October 3, 2016 at 8:50:08 AM UTC-5, David Pugh wrote:

If you are embedding the scripts directly you shouldn’t need the bokeh server but to serve the apps you need to include (at least on Windows):

–allow-websocket-origin=127.0.0.1:8000

In the bokeh serve command

bokeh serve mygraph.py --log-level=debug --host:localhost:5006 --host:localhost:8001 --allow-websocket-origin=127.0.0.1:8000

Hope this helps,

David

On 3 Oct 2016, at 14:05, Jason Haddix [email protected] wrote:

Hi David,

Thanks for replying. The problem I’m having is that I can’t seem to run both. Here is what I’m running to start Bokeh and DJango:

bokeh serve --log-level=debug --host:localhost:5006 --host:localhost:8001

This allows me to embed Bokeh scripts just fine through DJango, but if I try this:

bokeh serve mygraph.py --log-level=debug --host:localhost:5006 --host:localhost:8001

Then I can only run the “mygraph.py” Bokeh app. The Django app then says that it failed to connect to the bokeh server.

Am I doing something wrong here?

Thanks,

Jason

On Friday, September 30, 2016 at 9:10:19 AM UTC-5, David Pugh wrote:

Jason,

Running apps from bokeh and embedding them in django works ok for me - I haven’t used an iframe with it, so it could be this that is causing the problem - you may need to make sure that your hosts and ports are correct on the iframe, and check if they are allowed on the bokeh server.

Can you share some examples from your code to help understand why it’s not working?

Additionally, it’s pretty easy to embed apps directly using bokeh server and django without using an iframe.

David

On Thursday, September 29, 2016 at 10:03:51 PM UTC+1, Jason Haddix wrote:

I have a django application that I mimicked from the “happiness” example (https://github.com/bokeh/bokeh-demos/tree/master/happiness), so basic charts are being served via script and autoload_server.

For more complicated visuals with animation and sever-callback I want to deploy them as bokeh apps and include as an iframe.

The problem I’m running into is running[ bokeh serve] allows my django app to run with and embedded bokeh plot, but not the bokeh app. And running [bokeh serve myapp.py] loads the bokeh app, but not django.

Is there any way to get these both running at the same time?

Thanks,

Jason

You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/ZdTfasYhmDg/unsubscribe.

To unsubscribe from this group and all its topics, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/a726576f-78a2-484d-a4a6-b7cf7730124a%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.