From d1a1c05b9f9b4eb026c880548aeb2159a639f11e Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Mon, 29 Jun 2026 19:37:59 -0600 Subject: [PATCH] add new type of self-learning --- .../migrations/0007_alter_exercise_type.py | 18 ++++++++++++++++++ tutorial/models.py | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 tutorial/migrations/0007_alter_exercise_type.py diff --git a/tutorial/migrations/0007_alter_exercise_type.py b/tutorial/migrations/0007_alter_exercise_type.py new file mode 100644 index 0000000..ca1ecfc --- /dev/null +++ b/tutorial/migrations/0007_alter_exercise_type.py @@ -0,0 +1,18 @@ +# Generated by Django 6.0.4 on 2026-06-30 01:20 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('tutorial', '0006_migrate_mcq_answers'), + ] + + operations = [ + migrations.AlterField( + model_name='exercise', + name='type', + field=models.CharField(choices=[('mcq', '选择题'), ('sort', '代码排序'), ('fill', '代码填空'), ('match', '连线匹配'), ('predict', '输出预测'), ('debug', '代码找错'), ('group', '归类分组')], max_length=16), + ), + ] diff --git a/tutorial/models.py b/tutorial/models.py index 6e19866..af2a48d 100644 --- a/tutorial/models.py +++ b/tutorial/models.py @@ -12,6 +12,10 @@ class ExerciseType(models.TextChoices): MCQ = "mcq", "选择题" SORT = "sort", "代码排序" FILL = "fill", "代码填空" + MATCH = "match", "连线匹配" + PREDICT = "predict", "输出预测" + DEBUG = "debug", "代码找错" + GROUP = "group", "归类分组" class Tutorial(models.Model):