Initial commit

This commit is contained in:
kddd21a
2026-07-29 10:47:40 +00:00
commit 402c3ec6ed
171 changed files with 10536 additions and 0 deletions
@@ -0,0 +1,39 @@
# Generated by Django 6.0.7 on 2026-07-19 16:08
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('exams', '0009_examset_exact_html'),
]
operations = [
migrations.CreateModel(
name='QuestionGroup',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('key', models.SlugField(help_text='Short identifier used by Excel, for example notes_1.', max_length=60)),
('order', models.PositiveIntegerField(default=1)),
('layout_type', models.CharField(choices=[('notes', 'Notes / summary'), ('table', 'Table / form'), ('flow', 'Flow chart')], default='notes', max_length=20)),
('title', models.CharField(blank=True, max_length=200)),
('instructions', models.TextField(blank=True)),
('layout_html', models.TextField(help_text='Formatted worksheet HTML. Insert blanks with [[question number]], for example [[1]].')),
('section', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='question_groups', to='exams.section')),
],
options={
'ordering': ['order', 'id'],
},
),
migrations.AddField(
model_name='question',
name='group',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='questions', to='exams.questiongroup'),
),
migrations.AddConstraint(
model_name='questiongroup',
constraint=models.UniqueConstraint(fields=('section', 'key'), name='unique_question_group_key_per_section'),
),
]