On Sep 13, 2016, at 11:33 AM, Robbie Pritchard <rpritchard@ordinalscience.com> wrote:
I read throught the docs and found this Bokeh server — Bokeh 3.3.2 Documentation whcih would tell me that my bokeh app should include:
imports
args = curdoc().session_context.request.arguments
p = figure(title=string(args.get('Name')[0])
p.circle([1, 2, 3], [4, 5, 6])
output_server("hover")
show(p)
yet I am still confused on how to set the arguments with autoload_server
the_script = autoload_server(model=None,app_path='/emptydetails_graph',url="http://127.0.0.1:5006/"\)
On Tuesday, September 13, 2016 at 10:33:20 AM UTC-5, Robbie Pritchard wrote:
I'm currently running Bokeh 0.12.1 with Django 1.9.8.
I'm running an app with
bokeh serve emptydetails_graph.py
Let's say the emptydetails_graph.py running on the bokeh server is this:
from bokeh.plotting import figure, show, output_server
p = figure(title="Server Plot")
p.circle([1, 2, 3], [4, 5, 6])
output_server("hover")
show(p)
I would like to pass an argument from Django to start a new session similar to this:
from bokeh.plotting import figure, show, output_server
p = figure(title=STRING PARAMETER FROM DJANGO)
p.circle([1, 2, 3], [4, 5, 6])
output_server("hover")
show(p)
Obviously my use case is different, the main goal being I would like to pass a string from Django to a Bokeh App, when creating a new session.
the_script = autoload_server(model=None,app_path='/emptydetails_graph',url="http://127.0.0.1:5006/", STRING PARAMETER HERE)
How would I do this?
--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/a0113d8c-4c9a-4950-a876-e2e7c6070eaf%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.