1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-05 02:06:52 +00:00

Add Question model

This commit is contained in:
Yohann D'ANELLO 2020-10-31 14:37:36 +01:00
parent c11a40e054
commit 2a282e366e
3 changed files with 51 additions and 9 deletions

View 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')),
],
),
]

View File

@ -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.

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Corres2math\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-31 14:16+0100\n"
"POT-Creation-Date: 2020-10-31 14:34+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -213,7 +213,7 @@ msgstr "vidéo de synthèse"
msgid "Participation of the team {name} ({trigram})"
msgstr "Participation de l'équipe {name} ({trigram})"
#: apps/participation/models.py:166
#: apps/participation/models.py:166 apps/participation/models.py:240
msgid "participation"
msgstr "participation"
@ -242,23 +242,27 @@ msgstr "vidéo"
msgid "videos"
msgstr "vidéos"
#: apps/participation/models.py:240
#: apps/participation/models.py:245
msgid "question"
msgstr "question"
#: apps/participation/models.py:256
msgid "phase number"
msgstr "phase"
#: apps/participation/models.py:245
#: apps/participation/models.py:261
msgid "phase description"
msgstr "description"
#: apps/participation/models.py:249
#: apps/participation/models.py:265
msgid "start date of the given phase"
msgstr "début de la phase"
#: apps/participation/models.py:254
#: apps/participation/models.py:270
msgid "end date of the given phase"
msgstr "fin de la phase"
#: apps/participation/models.py:272
#: apps/participation/models.py:288
msgid ""
"Phase {phase_number:d} starts on {start:%Y-%m-%d %H:%M} and ends on {end:%Y-"
"%m-%d %H:%M}"
@ -266,11 +270,11 @@ msgstr ""
"Phase {phase_number:d} démarrant le {start:%d/%m/%Y %H:%M} et finissant le "
"{end:%d/%m/%Y %H:%M}"
#: apps/participation/models.py:276
#: apps/participation/models.py:292
msgid "phase"
msgstr "phase"
#: apps/participation/models.py:277
#: apps/participation/models.py:293
msgid "phases"
msgstr "phases"