bokeh / bokeh-django

Support for running Bokeh on Django
BSD 3-Clause "New" or "Revised" License
14 stars 5 forks source link

bokehjsdir deprecated starting from bokeh 3.4.0 #10

Open clementhelsens opened 4 months ago

clementhelsens commented 4 months ago

Hello,

starting from bokeh 3.4.0 bokehjsdir is deprecated. They ask to use bokehjs_path but when doing so, I can't start the server, when running

python manage.py runserver

it just do

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

and stops. Any idea how to fix this? Thanks

sdc50 commented 2 months ago

@clementhelsens This seems to have worked for me:

from bokeh.settings import settings as bokeh_settings

try:
    bokeh_js_dir = bokeh_settings.bokehjs_path()
except AttributeError:
    # support bokeh versions < 3.4
    bokeh_js_dir = bokeh_settings.bokehjsdir()

STATICFILES_DIRS = [
    ...,
    bokeh_js_dir,
]