
Hi everyone,
I am trying to embed a bokeh application inside a django template by using the django_embed example as a reference point.
I would like the url path to the django application, however, to include a primary key which I thought should be easy enough to implement but I’m running into trouble.
Here’s what I’m doing.
In the urlpatterns I rewrite the path to sea_surface as follows:
path("other/path/<int:pk>/sea_surface/", views.sea_surface)
I also update bokeh_apps variable:
autoload("other/path/<int:pk>/sea_surface", views.sea_surface_handler)
But this gives me a TypeError: unexpected keyword argument ‘pk’ on the sea_surface function which is defined in the views.py as follows:
def sea_surface(request: HttpRequest) -> HttpResponse:
script = server_document(request.build_absolute_uri())
return render(request, "embed.html", dict(script=script))
I am completely new to django so this is perhaps quite trivial but I cannot get it to work, so would appreciate a bit of help.

