mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-21 03:58:23 +02:00
Add Question model
This commit is contained in:
22
apps/participation/migrations/0007_question.py
Normal file
22
apps/participation/migrations/0007_question.py
Normal file
@ -0,0 +1,22 @@
|
||||
# Generated by Django 3.0.10 on 2020-10-31 13:36
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('participation', '0006_phase'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Question',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('question', models.TextField(verbose_name='question')),
|
||||
('participation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='questions', to='participation.Participation', verbose_name='participation')),
|
||||
],
|
||||
),
|
||||
]
|
@ -230,6 +230,22 @@ class Video(models.Model):
|
||||
verbose_name_plural = _("videos")
|
||||
|
||||
|
||||
class Question(models.Model):
|
||||
"""
|
||||
Question to ask to the team that sent a solution.
|
||||
"""
|
||||
participation = models.ForeignKey(
|
||||
Participation,
|
||||
on_delete=models.CASCADE,
|
||||
verbose_name=_("participation"),
|
||||
related_name="questions",
|
||||
)
|
||||
|
||||
question = models.TextField(
|
||||
verbose_name=_("question"),
|
||||
)
|
||||
|
||||
|
||||
class Phase(models.Model):
|
||||
"""
|
||||
The Phase model corresponds to the dates of the phase.
|
||||
|
Reference in New Issue
Block a user