why am I getting output in console as {{request.num}} without the actual number?
This is my code:
def test(request):
number = 4
context = {"num": number}
javascript
var number = "{{request.num}}";
console.log(number)
What worked for me is when I explicitly created the exact js variable inside a script tag in the template and consoled it out from the external js file, seems to work! Don't exactly know why that's happening but is.