KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to pass an Array to a template and afterwards use it via JavaScript. In my views.py I have: arry1 = ['Str',500,20] return render_to_response('test.html', {'array1': arry1}) And in my template: var array1 = {{ array1 }}; but when I visit the website it outputs: var array1 = ['Str',500,20]; What do I have to change?
Tags (comma-separated)
Save Edits
Cancel