Django | JS variable inside dynamic URL

I’m trying to pass a javascript variable inside a dynamic url using Django. I have the following path path(‘task-update//’, updateTask, name=’task-update’), I’m able to retrieve the &…