[Django]-Passing JSON strings to Django templates

3👍

You need to disable autoescaping.

return '{{ tx|safe }}';

Note, you really should not create JSON data as strings in your view; create it as a Python datastructure, then use json.dumps().

Leave a comment