jinjia2将后端传至前端的字典变量转换为JS变量
后端
country_dict = {'AE': '.amazon.ae', 'AU': '.amazon.com.au'}
前端
const country_list = JSON.parse('{{ country_list | tojson | safe }}');
country_dict = {'AE': '.amazon.ae', 'AU': '.amazon.com.au'}
const country_list = JSON.parse('{{ country_list | tojson | safe }}');