update path url code example
Example 1: url path
Django path
Example 2: how to change url path in javascript
var newURL = window.location.protocol + "//" + window.location.host + "/" + window.location.pathname + window.location.search
Django path
var newURL = window.location.protocol + "//" + window.location.host + "/" + window.location.pathname + window.location.search