Add game answer functionality with form and view for user responses
This commit is contained in:
parent
6dbb1a54e0
commit
d03d3b48d4
9 changed files with 97 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 5.2.3 on 2025-06-15 09:56
|
||||
# Generated by Django 5.2.3 on 2025-06-15 10:36
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
|
@ -24,7 +24,6 @@ class Migration(migrations.Migration):
|
|||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("order", models.PositiveIntegerField()),
|
||||
(
|
||||
"answer",
|
||||
models.ForeignKey(
|
||||
|
@ -37,7 +36,8 @@ class Migration(migrations.Migration):
|
|||
(
|
||||
"game",
|
||||
models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE, to="game.musikgame"
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to="game.musicgameorder",
|
||||
),
|
||||
),
|
||||
(
|
||||
|
@ -49,10 +49,10 @@ class Migration(migrations.Migration):
|
|||
),
|
||||
],
|
||||
options={
|
||||
"ordering": ["order"],
|
||||
"ordering": ["game"],
|
||||
"constraints": [
|
||||
models.UniqueConstraint(
|
||||
fields=("game", "player", "order"), name="unique_answer"
|
||||
fields=("game", "player"), name="unique_answer"
|
||||
)
|
||||
],
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue