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.
urlpatterns I rewrite the path to
sea_surface as follows:
I also update
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.