📅  最后修改于: 2022-03-11 15:02:56.987000             🧑  作者: Mango
import json
mylistraw = [10,22,33,45]
mylist = json.dumps(mylistraw)
context = {''mylistjson': mylist}
now you can use your object in javascript.
var mylist = JSON.parse("{{mylistjson}}")