How do I insert an id inside a url template tag using javascript? I tried this way and I did not get it. Can not find the route in the urls.py.
function Edit(pk){
window.location.assign("{% url 'authentication:edit_user' "+${pk}+" %}");
}
<!-- Other way -->
function Edit(pk){
window.location.assign("{% url 'authentication:edit_user' "+pk+" %}");
}
Error is:
Reverse for 'edit_user' with arguments '('+${pk}+',)' not found. 1 pattern(s) tried: ['authentication\/user\/edit\/(?P[0-9]+)\/$']