feat: add goal management section to student detail page
This commit is contained in:
@@ -39,11 +39,18 @@ def create_app():
|
||||
app.register_blueprint(main_bp)
|
||||
app.register_blueprint(templates_bp)
|
||||
app.register_blueprint(goals_bp)
|
||||
from app.routes import student_goals
|
||||
app.register_blueprint(student_goals.student_goals_bp)
|
||||
|
||||
# 创建数据库和目录
|
||||
with app.app_context():
|
||||
os.makedirs(os.path.join(BASE_DIR, "data"), exist_ok=True)
|
||||
os.makedirs(app.config["PDF_OUTPUT_DIR"], exist_ok=True)
|
||||
|
||||
# 确保所有模型都被导入
|
||||
from app.models import Student, Problem, StudentProblem, Template, PracticePlan
|
||||
from app.models import Goal, GoalRelation, StudentGoal # 新增目标相关模型
|
||||
|
||||
db.create_all()
|
||||
|
||||
# 简单迁移:为已存在的数据库添加新字段(必须在init_default_templates之前)
|
||||
|
||||
Reference in New Issue
Block a user