[Answer]-Django passing parameter as a string

1👍

It looks like you’re trying to use it in JavaScript. If you want it as a string, you need to quote it:

var s1 = "{{s1}}";

Otherwise the JavaScript code will see it is a mathematical expression and calculate it.

👤Ben

Leave a comment