From 377152d0b02b3bf6bd7e8bf9d8464646381d1373 Mon Sep 17 00:00:00 2001 From: artragis Date: Sun, 27 Sep 2020 18:20:48 +0200 Subject: [PATCH] =?UTF-8?q?mod=C3=A8les=20de=20stats?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zds/tutorialv2/migrations/0031_quizzstat.py | 25 ++++++++++ .../migrations/0032_auto_20200927_1015.py | 48 +++++++++++++++++++ .../0033_quizzuseranswer_full_answer_id.py | 18 +++++++ .../migrations/0034_auto_20200927_1105.py | 18 +++++++ 4 files changed, 109 insertions(+) create mode 100644 zds/tutorialv2/migrations/0031_quizzstat.py create mode 100644 zds/tutorialv2/migrations/0032_auto_20200927_1015.py create mode 100644 zds/tutorialv2/migrations/0033_quizzuseranswer_full_answer_id.py create mode 100644 zds/tutorialv2/migrations/0034_auto_20200927_1105.py diff --git a/zds/tutorialv2/migrations/0031_quizzstat.py b/zds/tutorialv2/migrations/0031_quizzstat.py new file mode 100644 index 0000000000..606a26c593 --- /dev/null +++ b/zds/tutorialv2/migrations/0031_quizzstat.py @@ -0,0 +1,25 @@ +# Generated by Django 2.2.16 on 2020-09-26 15:35 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('tutorialv2', '0030_contentsuggestion'), + ] + + operations = [ + migrations.CreateModel( + name='QuizzStat', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('url', models.TextField(verbose_name='url')), + ('question', models.TextField(verbose_name='question')), + ('answer', models.TextField(verbose_name='anwser')), + ('date_answer', models.DateField(auto_now=True, verbose_name='Date of answer')), + ('related_content', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='tutorialv2.PublishableContent', verbose_name='Tutoriel lié')), + ], + ), + ] diff --git a/zds/tutorialv2/migrations/0032_auto_20200927_1015.py b/zds/tutorialv2/migrations/0032_auto_20200927_1015.py new file mode 100644 index 0000000000..14cc1a37a3 --- /dev/null +++ b/zds/tutorialv2/migrations/0032_auto_20200927_1015.py @@ -0,0 +1,48 @@ +# Generated by Django 2.2.16 on 2020-09-27 10:15 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('tutorialv2', '0031_quizzstat'), + ] + + operations = [ + migrations.CreateModel( + name='QuizzAvailableAnswer', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('answer_label', models.TextField(verbose_name='Intitulé de la réponse')), + ('is_good', models.BooleanField(default=False, verbose_name='Est une réponse attendue')), + ], + ), + migrations.CreateModel( + name='QuizzQuestion', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('url', models.TextField(verbose_name='url')), + ('question', models.TextField(verbose_name='question')), + ], + ), + migrations.CreateModel( + name='QuizzUserAnswer', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('answer', models.TextField(verbose_name='anwser')), + ('date_answer', models.DateField(auto_now=True, verbose_name='Date of answer')), + ('related_content', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='tutorialv2.PublishableContent', verbose_name='Tutoriel lié')), + ('related_question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tutorialv2.QuizzQuestion', verbose_name='Question liée')), + ], + ), + migrations.DeleteModel( + name='QuizzStat', + ), + migrations.AddField( + model_name='quizzavailableanswer', + name='related_question', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tutorialv2.QuizzQuestion', verbose_name='Question liée'), + ), + ] diff --git a/zds/tutorialv2/migrations/0033_quizzuseranswer_full_answer_id.py b/zds/tutorialv2/migrations/0033_quizzuseranswer_full_answer_id.py new file mode 100644 index 0000000000..8672c4500a --- /dev/null +++ b/zds/tutorialv2/migrations/0033_quizzuseranswer_full_answer_id.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.16 on 2020-09-27 11:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('tutorialv2', '0032_auto_20200927_1015'), + ] + + operations = [ + migrations.AddField( + model_name='quizzuseranswer', + name='full_answer_id', + field=models.CharField(default='id', max_length=64, verbose_name='Indentifiant de la réponse utilisateur'), + ), + ] diff --git a/zds/tutorialv2/migrations/0034_auto_20200927_1105.py b/zds/tutorialv2/migrations/0034_auto_20200927_1105.py new file mode 100644 index 0000000000..3214a25163 --- /dev/null +++ b/zds/tutorialv2/migrations/0034_auto_20200927_1105.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.16 on 2020-09-27 11:05 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('tutorialv2', '0033_quizzuseranswer_full_answer_id'), + ] + + operations = [ + migrations.RenameField( + model_name='quizzavailableanswer', + old_name='answer_label', + new_name='label', + ), + ]