This wasn’t documented anywhere, but kudos to the Jinja2 devs for making this so easy to figure out from the source code.
You need to add a new key to the environment:
env.policies['json.dumps_kwargs'] = {'ensure_ascii': False}
This wasn’t documented anywhere, but kudos to the Jinja2 devs for making this so easy to figure out from the source code.
You need to add a new key to the environment:
env.policies['json.dumps_kwargs'] = {'ensure_ascii': False}
Pingback: tojson(4)}}; My settings is a dict {'name': 'Russian name Саша', 'id': 12345}. If I render it, i get: let SETTINGS = { "name": "Russian name … - 实战宝典
Pingback: tojson(4)}}; My settings is a dict {'name': 'Russian name Саша', 'id': 12345}. If I render it, i get: let SETTINGS = { "name": "Russian name … – 运维实战侠