The above code didnt copy correctly:
Bokeh Application html { width: 100%; height: 100%; } body { width: 90%; height: 100%; margin: auto; }``
···
On Tuesday, January 17, 2017 at 1:29:07 PM UTC-6, Rob Pritchard wrote:
simple_bokeh.py from bokeh.plotting import figure, output_file, show,curdoc from bokeh.models.widgets import Select from bokeh.layouts import row, column output_file("test.html") p = figure() name = "" print("simple bokeh") print("WHY NO PRINT") args = curdoc().session_context.request.arguments print(args) if args.get('name') == None: name = 'sheehy' else: name = str(args.get('name')[0]) name_split = name.split('%') name = name_split[1]; p.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], line_width=2) curdoc().add_root(column(p))
running on 0.12.3 with: bokeh serve simple_bokeh.py --allow-websocket-origin=127.0.0.1:8000 --host ‘*’
Django:
app_path = '/simple_bokeh?name=%' + 'apple' + '%'
script = autoload_server(model=None, app_path=app_path , url="[http://127.0.0.1:5006/](http://127.0.0.1:5006/)")
HTML:
<html lang="en"> <head> <meta charset="UTF-8"> <title>Experiment with Bokeh</title> <script src="[https://cdn.pydata.org/bokeh/release/bokeh-0.12.3.min.js](https://cdn.pydata.org/bokeh/release/bokeh-0.12.3.min.js)"></script> <link rel="stylesheet" href="[https://cdn.pydata.org/bokeh/release/bokeh-0.12.3.min.css](https://cdn.pydata.org/bokeh/release/bokeh-0.12.3.min.css)"> <script src="[https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.3.min.js](https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.3.min.js)"></script> </head> <div class="bk-root"> {{ the_script|safe }} </div> </body> </html>
the error i am geting is
http://[127.0.0.1:5006/simple_bokeh?name=$](http://127.0.0.1:5006/simple_bokeh?name=$)apple$/autoload.js?bokeh-autoload-element=5545c000-9fa0-4dd1-b622-008f57be18c1 Uncaught SyntaxError: Unexpected token <
which is found in:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bokeh Application</title> <link rel="stylesheet" href="[http://127.0.0.1:5006/static/css/bokeh.min.css?v=7246afcfffc127faef7c138bce4742e9](http://127.0.0.1:5006/static/css/bokeh.min.css?v=7246afcfffc127faef7c138bce4742e9)" type="text/css" /> <link rel="stylesheet" href="[http://127.0.0.1:5006/static/css/bokeh-widgets.min.css?v=d9cb9322d940f107727b091ff98d9c70](http://127.0.0.1:5006/static/css/bokeh-widgets.min.css?v=d9cb9322d940f107727b091ff98d9c70)" type="text/css" /> <script type="text/javascript" src="[http://127.0.0.1:5006/static/js/bokeh.min.js?v=9d3af13f493d36073a89714f6a5240c6](http://127.0.0.1:5006/static/js/bokeh.min.js?v=9d3af13f493d36073a89714f6a5240c6)"></script> <script type="text/javascript" src="[http://127.0.0.1:5006/static/js/bokeh-widgets.min.js?v=1af1302b8bd7fcc88c7bcafb8771497b](http://127.0.0.1:5006/static/js/bokeh-widgets.min.js?v=1af1302b8bd7fcc88c7bcafb8771497b)"></script> <script type="text/javascript"> Bokeh.set_log_level("info"); </script> <style> html { width: 100%; height: 100%; } body { width: 90%; height: 100%; margin: auto; } </style> </head> <body> <div class="bk-root"> <div class="bk-plotdiv" id="9b1aff35-ae75-4b83-8c44-1be3e409d990"></div> </div> <script type="text/javascript"> (function() { var fn = function() { Bokeh.safely(function() { var docs_json = <span style="color: #660;"