
I embed an autoload script within my Django template which works great. Its several plots with data aggregated from a database. However the database is currently updated via “regular django views” outside my bokeh app and i would like to update my bokeh plot when i update the data in the database.
bokeh_apps = [
autoload("duty_cycle_plot", apps_path / "DutyCycleVisualizer.py"),
]
# from my django view:
script = server_document(request._current_scheme_host + "/duty_cycle_plot")
Currently i have a button on my bokeh app that updates the the datasource. Is there an instance related to the served document i could use within my django backend and update this data source automatically after doing changes to the database?
My hypothetical solution is i could use websockets create a sessions that provides the serve_document autoload script and keeps the instance being served so i can modify the data being plotted.
What are my options here?
