check it out here if you want a preview:
username = regularuser
password = 1234password1234
On Fri, Nov 3, 2017 at 10:41 AM, Jonathan Bennett [email protected] wrote:
As I promised before, I’m going to share a project template repository to the group that shows Bokeh Server running via Django.
I’m going to have a tutorial that takes you step-by-step to install this on a production server.
If someone else beat me to the punch then kudos . . . I’d love to compare notes.
I should have it posted in the next few days, but for the time being I ran into an issue that I wanted to share and discuss here.
The good news is that I got it working in Bokeh 0.12.9. The bad new is that it doesn’t work in 0.12.10. (using Python 3.5.2 on Ubuntu 16.04 LTS)
I think (but I’m not sure) the session information is not being served properly in version 0.12.10.
I set up these environment variables via the settings.py file in Django:
os.environ[“BOKEH_SECRET_KEY”] = “blahblahblah”
os.environ[“BOKEH_SIGN_SESSIONS”] = “True”
and I run the bokeh server through systemd via a file called bokehserver.service
[Unit] Description=Bokeh Server After=network.target [Service] Environment="BOKEH_SECRET_KEY=blahblahblah" User=deployer1 Group=www-data WorkingDirectory=/home/deployer1/BokehDjango/bokehdash/BokehApps ExecStart=/home/deployer1/envs/BokehDjango352/bin/bokeh serve sliders.py selection_histogram.py --allow-websocket-origin 22.214.171.124 --address 127.0.0.1 --session-ids external-signed [Install] WantedBy=multi-user.target
and then call the session information from the running bokeh server application in the views.py file:
server_script = server_session(None, session_id=session_id.generate_session_id(), url=bokeh_server_url)
And it works perfectly for 0.12.9, but not 0.12.10
server_session returns None with the new version (and therefore the session isn’t recognized/authenticated), and it returns an object in the old version.
I should note that I verified the server is running in both versions – I just can’t get Django to pull in the information.
Am I doing something wrong or unsupported, or did something change (on purpose or accidentally) in the new version?
I’m happy to share more details and source code, but to give an actual working example I think you need to spin up the whole environment since I use nginx as well.
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/_d9kzckqzSE/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/565ab643-ae72-41ca-9e7c-3cae1f4a8fa5%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.