Esempio n. 1
0
def v3_models_regions():
    data = get_regional_template()
    data_dict = dict()
    for key in data:
        data_dict.update({key: {"region": data[key]["region"]}})
        for attr, val in data[key]["regionInfo"].items():
            if attr in ["population", "area", "lat", "long"]:
                data_dict[key][attr] = val
    return jsonify(data_dict)
Esempio n. 2
0
def v3_models_regions():
    data = get_regional_template()
    data_dict = dict()
    for key in data:
        data_dict.update({key: {"region": data[key]["region"]}})
        for attr, val in data[key]["regionInfo"].items():
            if attr in ["population", "area", "lat", "long"]:
                data_dict[key][attr] = val
    return Response(json.dumps(data_dict, ensure_ascii=False),
                    content_type="application/json; charset=utf-8")
Esempio n. 3
0
def v3_models_regions():
    data = get_regional_template()
    data_dict = dict()
    for key in data:
        data_dict.update({key: data[key]["region"]})
    return json.dumps(data_dict, ensure_ascii=False)