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)
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")
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)