This commit is contained in:
Holger Sielaff
2024-07-03 21:41:03 +02:00
commit 030d3c8059
45 changed files with 2025 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
# Generated by Django 4.2.13 on 2024-07-01 08:27
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('content', '0005_question_buzzword'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Quiz',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Question',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('points', models.DecimalField(decimal_places=1, default=1.0, max_digits=10)),
('order', models.IntegerField(default=1)),
('description', models.TextField(blank=True, null=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('question', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='content_question', to='content.question')),
('quiz', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='quiz.quiz')),
],
),
]

View File

@@ -0,0 +1,19 @@
# Generated by Django 4.2.13 on 2024-07-01 09:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('quiz', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='quiz',
name='name',
field=models.CharField(default='Moepquiz', max_length=250),
preserve_default=False,
),
]

View File

@@ -0,0 +1,22 @@
# Generated by Django 4.2.13 on 2024-07-02 08:09
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import lib.middleware.current_user
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('quiz', '0002_quiz_name'),
]
operations = [
migrations.AlterField(
model_name='quiz',
name='author',
field=models.ForeignKey(default=lib.middleware.current_user.get_current_user, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
),
]

View File