Answers for "array javascript django"

0

array javascript django

//https://stackoverflow.com/questions/739942/how-to-pass-an-array-in-django-to-a-template-and-use-it-with-javascript

//In Django:
from django.utils import simplejson
json_list = simplejson.dumps(YOUR_LIST)
//AND PASS "json_list" IN CONTEXT

//In JS:
var YOUR_JS_LIST = {{YOUR_LIST|safe}};
Posted by: Guest on May-25-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language