Resolve "Host und Spiel App erstellen und Grundlegende Templates erstellen" #176

Merged
jvs merged 7 commits from 21-host-und-spiel-app-erstellen-und-grundlegende-templates-erstellen into master 2025-03-15 14:26:47 +00:00
2 changed files with 19 additions and 1 deletions
Showing only changes of commit 838eaab9be - Show all commits
@@ -0,0 +1,18 @@
# Generated by Django 5.1.7 on 2025-03-15 13:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('play', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='quizgame',
name='join_code',
field=models.CharField(blank=True, max_length=6, unique=True),
),
]
+1 -1
View File
@@ -6,7 +6,7 @@ import random, string
# Create your models here. # Create your models here.
class QuizGame(models.Model): class QuizGame(models.Model):
host_user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='host_user') host_user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='host_user')
join_code = models.CharField(max_length=6, unique=True) join_code = models.CharField(max_length=6, unique=True, blank=True)
quiz_id = models.ForeignKey(QivipQuiz, on_delete=models.CASCADE) quiz_id = models.ForeignKey(QivipQuiz, on_delete=models.CASCADE)
def save(self, *args, **kwargs): def save(self, *args, **kwargs):