diff --git a/apps/participation/migrations/0007_question.py b/apps/participation/migrations/0007_question.py new file mode 100644 index 0000000..814487f --- /dev/null +++ b/apps/participation/migrations/0007_question.py @@ -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')), + ], + ), + ] diff --git a/apps/participation/models.py b/apps/participation/models.py index b8a3bd5..0058e3b 100644 --- a/apps/participation/models.py +++ b/apps/participation/models.py @@ -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. diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 54d390c..7761a1e 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -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 \n" "Language-Team: LANGUAGE \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"