How to Bokeh serve + Django

@yvechang I think you may have an issue in your //settings.py file. The Bokeh relevant pieces are as follows. Also make sure you really have Django==3.1.8 in your venv, maybe check with pip freeze | grep Django. We are not using django_embed.

'''
Django settings for <project_name> project.

Generated by 'django-admin startproject' using Django 3.0.6.

For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
'''

import ...
import logging
import logging.config
from datetime import datetime

# extra for Panel support
from bokeh.settings import bokehjsdir, settings

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/

... 

# Bokeh
ASGI_APPLICATION = '<project_name>.routing.application'

# Application definition
# for Panel support apps channels and bokeh.server.django were added

INSTALLED_APPS = [
        ...,
        'channels',
        'bokeh.server.django',
        ]

MIDDLEWARE = [
        ...
        ]

ROOT_URLCONF = '<project_name>.urls'


# CSRF Information Needed so Daphne/Django trusts CSRF cookies from NGINX
CSRF_TRUSTED_ORIGINS = ALLOWED_HOSTS

# added <Bokeh app> templates to TEMPLATES for Panel support
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'sliders', 'templates'),
            ...
                 ],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

...

# for Panel added bokehjsdir to static files dir
STATICFILES_DIRS = [
        (os.path.join(BASE_DIR, 'static')),
        bokehjsdir(),
        ]