0016_load_country_income_thresholds.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:micromasters 作者: mitodl 项目源码 文件源码
def get_country_income_thresholds_data():
    """
    Returns a list of dictionaries of data imported from financialaid/fixtures/country_income_threshold_data.json.
    """
    fixture_path = os.path.join(settings.BASE_DIR, "financialaid/fixtures/country_income_threshold_data.json")
    with open(fixture_path, "r") as f:
        country_data = json.loads(f.read())
    return [
        {
            "country_code": country["fields"]["country_code"],
            "income_threshold": DEFAULT_INCOME_THRESHOLD
        }
        for country in country_data
    ]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号