My view computes json and outputs json.dumps() , and I pass this as the data dictionary key. I am trying to pass this to the script element in my template, but when rendering the browser receives it as a string with escaped python {"nodes": [{"count":...... that is not readable by javascript. I need python to send it as a string with escaped JS, something like this {"nodes": [{"count":...... I tried str(data) and eval(data) without success. Basically I need python to send the string the same way as if it were printing it to the console. Thanks
json javascript python django
leonsas
source share