This commit is contained in:
2025-09-11 21:23:39 +08:00
parent b821e316ca
commit 9349d582b6
5 changed files with 86 additions and 68 deletions

View File

@@ -12,8 +12,10 @@ class EducationDataModel:
'vocational': '中职'
}
# 数据文件路径
DATA_DIR = '../Data'
# 获取脚本所在目录的绝对路径
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# 使用绝对路径定义数据目录和文件
DATA_DIR = os.path.join(BASE_DIR, '../Data')
SCHOOL_COUNT_FILE = os.path.join(DATA_DIR, 'SchoolCount.json')
TEACHER_COUNT_FILE = os.path.join(DATA_DIR, 'TeacherCount.json')
ENROLLMENT_COUNT_FILE = os.path.join(DATA_DIR, 'ZaiXiaoShengCount.json')