0👍
You can not work with a template tag to determine the URL since a template tag is resolved at the server, not at the client, and the JavaScript function runs at the client.
You thus should construct the url with:
axios({
url: 'save_todo_update/' + id,
# ⋮
}).then(response => {
// console.log(response.data)
this.getTodos()
})
Source:stackexchange.com