Problems with Panel and Django

That’s a tricky question.

It would be useful to be able to explain how to use Daphne as Gunicorn can’t be used for this… and I wasn’t able to make this to work with Uvicorn… So adding how to use Daphne to the user guide is something that definitely people would find useful. Also, it’s important the addition of ASGI_APPLICATION = 'yourdjangoappname.routing.application' in the base.py file (substituting yourdjangoappname with the name of the app for the example, of course).

There’s also a problem in urls.py: I was only able to make the app to run if I commented out from bokeh.server.django import static_extensions, an then urlpatterns += static_extensions(). I don’t know the implications of that, but it seems to be a problem importing static_extensions.

Also, the versioning of the modules used is very tricky… I was only able to have everything running with a very specific combination of versions, as I explained in one of my earlier comments… And that can be the explanation why I wasn’t able to import static_extensions.

All these problems with the versioning, and the fact that I’m not sure of the consequences of not using static_extensions is what makes the question of what to add to the user guide tricky…

1 Like