Here (https://bokeh.github.io/blog/2018/6/13/release-0-13-0/) it is mentioned that now we can use curdoc() instead of components.
I tried to move the following code
view.py:
script, div = components(PlotView().make_plot(), CDN)
context['plot_script'] = script
context['plot_div'] = div
template.html:
{% if plot_script %}
{{ plot_script|safe }}
{% endif %}
{% if plot_div %}
{{ plot_div|safe }}
{% endif %}
to the curdoc example provided in the link. But this line in the template file {{ embed(roots.region) }}
doesn't make sense for django.