From a19584177167796224adc753c0daddc5e4308abb Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Sun, 19 Feb 2023 10:44:10 +0100 Subject: [PATCH 1/3] Migrate Question & Quiz validation_status values --- api/quizs/test_quiz_api.py | 2 +- api/tests/test_api.py | 2 +- api/tests/test_models.py | 2 +- core/constants.py | 24 +++++++------- locale/en/LC_MESSAGES/django.po | 22 ++++++++++++- locale/fr/LC_MESSAGES/django.po | 26 ++++++++++++++- questions/factories.py | 2 +- ...24_question_validation_status_migration.py | 33 +++++++++++++++++++ questions/models.py | 10 +++--- questions/tests.py | 22 ++++++++----- quizs/factories.py | 2 +- .../0023_quiz_validation_status_migration.py | 33 +++++++++++++++++++ quizs/models.py | 8 ++--- quizs/tests.py | 12 +++---- www/questions/tests.py | 6 ++-- www/quizs/tests.py | 6 ++-- 16 files changed, 164 insertions(+), 48 deletions(-) create mode 100644 questions/migrations/0024_question_validation_status_migration.py create mode 100644 quizs/migrations/0023_quiz_validation_status_migration.py diff --git a/api/quizs/test_quiz_api.py b/api/quizs/test_quiz_api.py index 6cbec1d20..c84b18487 100644 --- a/api/quizs/test_quiz_api.py +++ b/api/quizs/test_quiz_api.py @@ -24,7 +24,7 @@ def setUpTestData(cls): text="question 1", category=cls.category_1, author=cls.user_1, - validation_status=constants.VALIDATION_STATUS_IN_PROGRESS, + validation_status=constants.VALIDATION_STATUS_TO_VALIDATE, ) cls.question_2 = QuestionFactory( text="question 2", diff --git a/api/tests/test_api.py b/api/tests/test_api.py index d2eec5406..3e9e9958c 100644 --- a/api/tests/test_api.py +++ b/api/tests/test_api.py @@ -23,7 +23,7 @@ def setUpTestData(cls): text="question 1", category=cls.category_1, author=cls.user_1, - validation_status=constants.VALIDATION_STATUS_IN_PROGRESS, + validation_status=constants.VALIDATION_STATUS_TO_VALIDATE, ) cls.question_2 = QuestionFactory( text="question 2", diff --git a/api/tests/test_models.py b/api/tests/test_models.py index d932f2be7..9e5a1e0e8 100644 --- a/api/tests/test_models.py +++ b/api/tests/test_models.py @@ -177,7 +177,7 @@ def test_published_quiz_can_have_not_validated_questions(self): self.question_validated = QuestionFactory(answer_correct="a") self.question_not_validated = QuestionFactory( answer_correct="a", - validation_status=constants.VALIDATION_STATUS_IN_PROGRESS, + validation_status=constants.VALIDATION_STATUS_TO_VALIDATE, ) self.quiz_published = QuizFactory(name="quiz published", publish=True) self.quiz_not_published = QuizFactory(name="quiz not published") diff --git a/core/constants.py b/core/constants.py index b55371be8..b29a66912 100644 --- a/core/constants.py +++ b/core/constants.py @@ -56,19 +56,19 @@ "traduction", ] -VALIDATION_STATUS_NEW = "Brouillon" -VALIDATION_STATUS_IN_PROGRESS = "A valider" -VALIDATION_STATUS_OK = "Validée" -VALIDATION_STATUS_ASIDE = "Écartée temporairement" -VALIDATION_STATUS_REMOVED = "Écartée" -VALIDATION_STATUS_CHOICE_LIST = [ - VALIDATION_STATUS_NEW, - VALIDATION_STATUS_IN_PROGRESS, - VALIDATION_STATUS_OK, - VALIDATION_STATUS_ASIDE, - VALIDATION_STATUS_REMOVED, +VALIDATION_STATUS_DRAFT = "DRAFT" +VALIDATION_STATUS_TO_VALIDATE = "TO_VALIDATE" +VALIDATION_STATUS_VALIDATED = "VALIDATED" +VALIDATION_STATUS_ASIDE = "ASIDE" +VALIDATION_STATUS_REMOVED = "REMOVED" +VALIDATION_STATUS_CHOICES = [ + (VALIDATION_STATUS_DRAFT, _("Draft")), + (VALIDATION_STATUS_TO_VALIDATE, _("To validate")), + (VALIDATION_STATUS_VALIDATED, _("Validated")), + (VALIDATION_STATUS_ASIDE, _("Set aside")), + (VALIDATION_STATUS_REMOVED, _("Removed")), ] -VALIDATION_STATUS_CHOICES = [(vs, vs) for vs in VALIDATION_STATUS_CHOICE_LIST] +VALIDATION_STATUS_CHOICE_LIST = [vs[0] for vs in VALIDATION_STATUS_CHOICES] CONTRIBUTION_TYPE_NEW_QUESTION = "NEW_QUESTION" CONTRIBUTION_TYPE_NEW_QUIZ = "NEW_QUIZ" diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index da9838e1e..4df52bfb0 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-18 22:24+0100\n" +"POT-Creation-Date: 2023-02-19 10:29+0100\n" "PO-Revision-Date: 2023-02-12 20:12+0100\n" "Last-Translator: Didier Quirin \n" "Language-Team: \n" @@ -59,6 +59,26 @@ msgstr "" msgid "Expert" msgstr "" +#: core/constants.py:65 +msgid "Draft" +msgstr "" + +#: core/constants.py:66 +msgid "To validate" +msgstr "" + +#: core/constants.py:67 +msgid "Validated" +msgstr "" + +#: core/constants.py:68 +msgid "Set aside" +msgstr "" + +#: core/constants.py:69 +msgid "Removed" +msgstr "" + #: core/constants.py:116 msgid "German" msgstr "" diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index bd3fbd71f..01645a900 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-18 22:24+0100\n" +"POT-Creation-Date: 2023-02-19 10:29+0100\n" "PO-Revision-Date: 2023-02-18 22:24+0100\n" "Last-Translator: Didier Quirin \n" "Language-Team: \n" @@ -59,6 +59,30 @@ msgstr "Difficule" msgid "Expert" msgstr "Expert" +#: core/constants.py:65 +msgid "Draft" +msgstr "" + +#: core/constants.py:66 +#, fuzzy +#| msgid "Validator" +msgid "To validate" +msgstr "Validateur" + +#: core/constants.py:67 +#, fuzzy +#| msgid "Validator" +msgid "Validated" +msgstr "Validateur" + +#: core/constants.py:68 +msgid "Set aside" +msgstr "" + +#: core/constants.py:69 +msgid "Removed" +msgstr "" + #: core/constants.py:116 msgid "German" msgstr "Allemand" diff --git a/questions/factories.py b/questions/factories.py index 10192e14b..223dcf4a1 100644 --- a/questions/factories.py +++ b/questions/factories.py @@ -17,4 +17,4 @@ class Meta: answer_choice_a = "La réponse A" answer_choice_b = "La réponse B" answer_correct = "a" # constants.QUESTION_ANSWER_CHOICE_LIST[0] - validation_status = constants.VALIDATION_STATUS_OK + validation_status = constants.VALIDATION_STATUS_VALIDATED diff --git a/questions/migrations/0024_question_validation_status_migration.py b/questions/migrations/0024_question_validation_status_migration.py new file mode 100644 index 000000000..b77c8f30d --- /dev/null +++ b/questions/migrations/0024_question_validation_status_migration.py @@ -0,0 +1,33 @@ +# Generated by Django 4.1.5 on 2023-02-19 10:30 + +from django.db import migrations + + +def migrate_question_validation_status(apps, schema_editor): + Question = apps.get_model("questions", "Question") + Question.objects.filter(validation_status="Brouillon").update(validation_status="DRAFT") + Question.objects.filter(validation_status="A valider").update(validation_status="TO_VALIDATE") + Question.objects.filter(validation_status="Validée").update(validation_status="VALIDATED") + Question.objects.filter(validation_status="Écartée temporairement").update(validation_status="ASIDE") + Question.objects.filter(validation_status="Écartée").update(validation_status="REMOVED") + + +def migrate_historical_question_validation_status(apps, schema_editor): + HistoricalQuestion = apps.get_model("questions", "HistoricalQuestion") + HistoricalQuestion.objects.filter(validation_status="Brouillon").update(validation_status="DRAFT") + HistoricalQuestion.objects.filter(validation_status="A valider").update(validation_status="TO_VALIDATE") + HistoricalQuestion.objects.filter(validation_status="Validée").update(validation_status="VALIDATED") + HistoricalQuestion.objects.filter(validation_status="Écartée temporairement").update(validation_status="ASIDE") + HistoricalQuestion.objects.filter(validation_status="Écartée").update(validation_status="REMOVED") + + +class Migration(migrations.Migration): + + dependencies = [ + ("questions", "0023_alter_historicalquestion_difficulty_and_more"), + ] + + operations = [ + migrations.RunPython(migrate_question_validation_status), + migrations.RunPython(migrate_historical_question_validation_status), + ] diff --git a/questions/models.py b/questions/models.py index 62c90361b..86223e1ae 100644 --- a/questions/models.py +++ b/questions/models.py @@ -19,10 +19,10 @@ class QuestionQuerySet(models.QuerySet): def validated(self): - return self.filter(validation_status=constants.VALIDATION_STATUS_OK) + return self.filter(validation_status=constants.VALIDATION_STATUS_VALIDATED) def not_validated(self): - return self.exclude(validation_status=constants.VALIDATION_STATUS_OK) + return self.exclude(validation_status=constants.VALIDATION_STATUS_VALIDATED) def public(self): return self.exclude(visibility=constants.VISIBILITY_PRIVATE) @@ -219,7 +219,7 @@ class Question(models.Model): verbose_name=_("Status"), max_length=150, choices=constants.VALIDATION_STATUS_CHOICES, - default=constants.VALIDATION_STATUS_NEW, + default=constants.VALIDATION_STATUS_DRAFT, ) validation_date = models.DateTimeField(verbose_name=_("Validation date"), blank=True, null=True) @@ -322,7 +322,7 @@ def is_private(self) -> bool: @property def is_validated(self) -> bool: - return self.validation_status == constants.VALIDATION_STATUS_OK + return self.validation_status == constants.VALIDATION_STATUS_VALIDATED @property def answer_count_agg(self) -> int: @@ -374,7 +374,7 @@ def clean(self): - https://adamj.eu/tech/2020/01/22/djangos-field-choices-dont-constrain-your-data/ """ # > only run on validated questions - if self.validation_status == constants.VALIDATION_STATUS_OK: + if self.validation_status == constants.VALIDATION_STATUS_VALIDATED: # > category rules if self.category is None: error_message = ( diff --git a/questions/tests.py b/questions/tests.py index cd8f15f17..ac56a9443 100644 --- a/questions/tests.py +++ b/questions/tests.py @@ -95,7 +95,7 @@ def setUpTestData(cls): text="Test", category=cls.category_1, # tags=[cls.tag_1, cls.tag_2], - validation_status=constants.VALIDATION_STATUS_NEW, + validation_status=constants.VALIDATION_STATUS_DRAFT, ) cls.question.tags.set([cls.tag_1, cls.tag_2]) @@ -140,7 +140,7 @@ def test_history_object_created_on_save(self): def test_history_diff(self): self.question.text = "La vraie question" - self.question.validation_status = constants.VALIDATION_STATUS_OK + self.question.validation_status = constants.VALIDATION_STATUS_VALIDATED self.question.category = self.category_2 self.question.save() self.assertEqual(self.question.history.count(), 2 + 1) @@ -160,14 +160,20 @@ class QuestionModelQuerySetTest(TestCase): @classmethod def setUpTestData(cls): cls.user_contributor = UserFactory() - QuestionFactory(validation_status=constants.VALIDATION_STATUS_OK, visibility=constants.VISIBILITY_PUBLIC) - QuestionFactory(validation_status=constants.VALIDATION_STATUS_OK, visibility=constants.VISIBILITY_HIDDEN) - QuestionFactory(validation_status=constants.VALIDATION_STATUS_OK, visibility=constants.VISIBILITY_PRIVATE) - QuestionFactory(validation_status=constants.VALIDATION_STATUS_NEW, visibility=constants.VISIBILITY_PUBLIC) - QuestionFactory(validation_status=constants.VALIDATION_STATUS_NEW, visibility=constants.VISIBILITY_HIDDEN) + QuestionFactory( + validation_status=constants.VALIDATION_STATUS_VALIDATED, visibility=constants.VISIBILITY_PUBLIC + ) + QuestionFactory( + validation_status=constants.VALIDATION_STATUS_VALIDATED, visibility=constants.VISIBILITY_HIDDEN + ) + QuestionFactory( + validation_status=constants.VALIDATION_STATUS_VALIDATED, visibility=constants.VISIBILITY_PRIVATE + ) + QuestionFactory(validation_status=constants.VALIDATION_STATUS_DRAFT, visibility=constants.VISIBILITY_PUBLIC) + QuestionFactory(validation_status=constants.VALIDATION_STATUS_DRAFT, visibility=constants.VISIBILITY_HIDDEN) QuestionFactory( text="xyz", - validation_status=constants.VALIDATION_STATUS_NEW, + validation_status=constants.VALIDATION_STATUS_DRAFT, visibility=constants.VISIBILITY_PRIVATE, author=cls.user_contributor, ) diff --git a/quizs/factories.py b/quizs/factories.py index 0a4ed994d..53931b49f 100644 --- a/quizs/factories.py +++ b/quizs/factories.py @@ -11,5 +11,5 @@ class Meta: name = "Le quiz" slug = factory.LazyAttribute(lambda o: slugify(o.name)) - validation_status = constants.VALIDATION_STATUS_OK + validation_status = constants.VALIDATION_STATUS_VALIDATED publish = False diff --git a/quizs/migrations/0023_quiz_validation_status_migration.py b/quizs/migrations/0023_quiz_validation_status_migration.py new file mode 100644 index 000000000..708d2c9d9 --- /dev/null +++ b/quizs/migrations/0023_quiz_validation_status_migration.py @@ -0,0 +1,33 @@ +# Generated by Django 4.1.5 on 2023-02-19 10:30 + +from django.db import migrations + + +def migrate_quiz_validation_status(apps, schema_editor): + Quiz = apps.get_model("quizs", "Quiz") + Quiz.objects.filter(validation_status="Brouillon").update(validation_status="DRAFT") + Quiz.objects.filter(validation_status="A valider").update(validation_status="TO_VALIDATE") + Quiz.objects.filter(validation_status="Validée").update(validation_status="VALIDATED") + Quiz.objects.filter(validation_status="Écartée temporairement").update(validation_status="ASIDE") + Quiz.objects.filter(validation_status="Écartée").update(validation_status="REMOVED") + + +def migrate_historical_quiz_validation_status(apps, schema_editor): + HistoricalQuiz = apps.get_model("quizs", "HistoricalQuiz") + HistoricalQuiz.objects.filter(validation_status="Brouillon").update(validation_status="DRAFT") + HistoricalQuiz.objects.filter(validation_status="A valider").update(validation_status="TO_VALIDATE") + HistoricalQuiz.objects.filter(validation_status="Validée").update(validation_status="VALIDATED") + HistoricalQuiz.objects.filter(validation_status="Écartée temporairement").update(validation_status="ASIDE") + HistoricalQuiz.objects.filter(validation_status="Écartée").update(validation_status="REMOVED") + + +class Migration(migrations.Migration): + + dependencies = [ + ("quizs", "0022_alter_historicalquiz_language_and_more"), + ] + + operations = [ + migrations.RunPython(migrate_quiz_validation_status), + migrations.RunPython(migrate_historical_quiz_validation_status), + ] diff --git a/quizs/models.py b/quizs/models.py index 8bc3f486f..a86fa1fc4 100644 --- a/quizs/models.py +++ b/quizs/models.py @@ -23,10 +23,10 @@ def prefetch_many_to_many(self): return self.prefetch_related("questions", "tags", "authors", "relationships") def validated(self): - return self.filter(validation_status=constants.VALIDATION_STATUS_OK) + return self.filter(validation_status=constants.VALIDATION_STATUS_VALIDATED) def not_validated(self): - return self.exclude(validation_status=constants.VALIDATION_STATUS_OK) + return self.exclude(validation_status=constants.VALIDATION_STATUS_VALIDATED) def published(self): return self.filter(publish=True) @@ -125,7 +125,7 @@ class Quiz(models.Model): verbose_name="Statut", max_length=150, choices=constants.VALIDATION_STATUS_CHOICES, - default=constants.VALIDATION_STATUS_NEW, + default=constants.VALIDATION_STATUS_DRAFT, ) validator = models.ForeignKey( verbose_name="Validateur", @@ -251,7 +251,7 @@ def is_private(self) -> bool: @property def is_validated(self) -> bool: - return self.validation_status == constants.VALIDATION_STATUS_OK + return self.validation_status == constants.VALIDATION_STATUS_VALIDATED @property def questions_categories_list(self) -> list: diff --git a/quizs/tests.py b/quizs/tests.py index 446a9b661..8814987e2 100644 --- a/quizs/tests.py +++ b/quizs/tests.py @@ -164,38 +164,38 @@ class QuizModelQuerySetTest(TestCase): def setUpTestData(cls): QuizFactory( name="Quiz 1", - validation_status=constants.VALIDATION_STATUS_OK, + validation_status=constants.VALIDATION_STATUS_VALIDATED, publish=True, visibility=constants.VISIBILITY_PUBLIC, ) QuizFactory( name="Quiz 2", - validation_status=constants.VALIDATION_STATUS_OK, + validation_status=constants.VALIDATION_STATUS_VALIDATED, publish=True, visibility=constants.VISIBILITY_HIDDEN, ) QuizFactory( name="Quiz 3", - validation_status=constants.VALIDATION_STATUS_OK, + validation_status=constants.VALIDATION_STATUS_VALIDATED, publish=True, visibility=constants.VISIBILITY_PRIVATE, ) QuizFactory( name="Quiz 4", - validation_status=constants.VALIDATION_STATUS_NEW, + validation_status=constants.VALIDATION_STATUS_DRAFT, publish=False, visibility=constants.VISIBILITY_PUBLIC, ) QuizFactory( name="Quiz 5", - validation_status=constants.VALIDATION_STATUS_NEW, + validation_status=constants.VALIDATION_STATUS_DRAFT, publish=False, visibility=constants.VISIBILITY_HIDDEN, ) QuizFactory( name="Quiz 6", introduction="xyz", - validation_status=constants.VALIDATION_STATUS_NEW, + validation_status=constants.VALIDATION_STATUS_DRAFT, publish=False, visibility=constants.VISIBILITY_PRIVATE, ) diff --git a/www/questions/tests.py b/www/questions/tests.py index b8f2a62b0..ecf052e76 100644 --- a/www/questions/tests.py +++ b/www/questions/tests.py @@ -90,7 +90,7 @@ def setUpTestData(cls): text="Question 1", author=cls.user_contributor_1, visibility=constants.VISIBILITY_PUBLIC, - validation_status=constants.VALIDATION_STATUS_IN_PROGRESS, + validation_status=constants.VALIDATION_STATUS_TO_VALIDATE, ) cls.question_2 = QuestionFactory( text="Question 2", author=cls.user_contributor_1, visibility=constants.VISIBILITY_PRIVATE @@ -113,7 +113,7 @@ def test_only_author_or_super_contributor_can_edit_public_question(self): def test_administrator_can_validate_public_question(self): self.client.login(email=self.user_admin.email, password=DEFAULT_PASSWORD) - self.assertEqual(self.question_1.validation_status, constants.VALIDATION_STATUS_IN_PROGRESS) + self.assertEqual(self.question_1.validation_status, constants.VALIDATION_STATUS_TO_VALIDATE) url = reverse("questions:detail_edit", args=[self.question_1.id]) QUESTION_EDIT_FORM = { **QUESTION_CREATE_FORM_DEFAULT, @@ -121,7 +121,7 @@ def test_administrator_can_validate_public_question(self): "category": self.question_1.category.id, "author": self.question_1.author, "visibility": self.question_1.visibility, - "validation_status": constants.VALIDATION_STATUS_OK, + "validation_status": constants.VALIDATION_STATUS_VALIDATED, } response = self.client.post(url, data=QUESTION_EDIT_FORM) self.assertEqual(response.status_code, 302) diff --git a/www/quizs/tests.py b/www/quizs/tests.py index 439d5764e..11672785a 100644 --- a/www/quizs/tests.py +++ b/www/quizs/tests.py @@ -83,7 +83,7 @@ def setUpTestData(cls): name="Quiz 1", # authors=[cls.user_contributor_1], visibility=constants.VISIBILITY_PUBLIC, - validation_status=constants.VALIDATION_STATUS_IN_PROGRESS, + validation_status=constants.VALIDATION_STATUS_TO_VALIDATE, publish=False, ) cls.quiz_1.authors.set([cls.user_contributor_1]) @@ -109,12 +109,12 @@ def test_author_or_admin_can_edit_public_quiz(self): def test_administrator_can_validate_and_publish_public_quiz(self): self.client.login(email=self.user_admin.email, password=DEFAULT_PASSWORD) - self.assertEqual(self.quiz_1.validation_status, constants.VALIDATION_STATUS_IN_PROGRESS) + self.assertEqual(self.quiz_1.validation_status, constants.VALIDATION_STATUS_TO_VALIDATE) self.assertEqual(self.quiz_1.publish, False) url = reverse("quizs:detail_edit", args=[self.quiz_1.id]) QUIZ_EDIT_FORM = { **QUIZ_CREATE_FORM_DEFAULT, - "validation_status": constants.VALIDATION_STATUS_OK, + "validation_status": constants.VALIDATION_STATUS_VALIDATED, "publish": True, } response = self.client.post(url, data=QUIZ_EDIT_FORM) From b380aa5bf08bf4112a788e60cab4ea83fdc4de19 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Sun, 19 Feb 2023 10:45:14 +0100 Subject: [PATCH 2/3] Migrate choice values --- ...icalquestion_validation_status_and_more.py | 45 +++++++++++++++++++ ...storicalquiz_validation_status_and_more.py | 45 +++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 questions/migrations/0025_alter_historicalquestion_validation_status_and_more.py create mode 100644 quizs/migrations/0024_alter_historicalquiz_validation_status_and_more.py diff --git a/questions/migrations/0025_alter_historicalquestion_validation_status_and_more.py b/questions/migrations/0025_alter_historicalquestion_validation_status_and_more.py new file mode 100644 index 000000000..336067ffa --- /dev/null +++ b/questions/migrations/0025_alter_historicalquestion_validation_status_and_more.py @@ -0,0 +1,45 @@ +# Generated by Django 4.1.5 on 2023-02-19 09:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("questions", "0024_question_validation_status_migration"), + ] + + operations = [ + migrations.AlterField( + model_name="historicalquestion", + name="validation_status", + field=models.CharField( + choices=[ + ("DRAFT", "Draft"), + ("TO_VALIDATE", "To validate"), + ("VALIDATED", "Validated"), + ("ASIDE", "Set aside"), + ("REMOVED", "Removed"), + ], + default="DRAFT", + max_length=150, + verbose_name="Status", + ), + ), + migrations.AlterField( + model_name="question", + name="validation_status", + field=models.CharField( + choices=[ + ("DRAFT", "Draft"), + ("TO_VALIDATE", "To validate"), + ("VALIDATED", "Validated"), + ("ASIDE", "Set aside"), + ("REMOVED", "Removed"), + ], + default="DRAFT", + max_length=150, + verbose_name="Status", + ), + ), + ] diff --git a/quizs/migrations/0024_alter_historicalquiz_validation_status_and_more.py b/quizs/migrations/0024_alter_historicalquiz_validation_status_and_more.py new file mode 100644 index 000000000..7fca93d0c --- /dev/null +++ b/quizs/migrations/0024_alter_historicalquiz_validation_status_and_more.py @@ -0,0 +1,45 @@ +# Generated by Django 4.1.5 on 2023-02-19 09:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("quizs", "0023_quiz_validation_status_migration"), + ] + + operations = [ + migrations.AlterField( + model_name="historicalquiz", + name="validation_status", + field=models.CharField( + choices=[ + ("DRAFT", "Draft"), + ("TO_VALIDATE", "To validate"), + ("VALIDATED", "Validated"), + ("ASIDE", "Set aside"), + ("REMOVED", "Removed"), + ], + default="DRAFT", + max_length=150, + verbose_name="Statut", + ), + ), + migrations.AlterField( + model_name="quiz", + name="validation_status", + field=models.CharField( + choices=[ + ("DRAFT", "Draft"), + ("TO_VALIDATE", "To validate"), + ("VALIDATED", "Validated"), + ("ASIDE", "Set aside"), + ("REMOVED", "Removed"), + ], + default="DRAFT", + max_length=150, + verbose_name="Statut", + ), + ), + ] From 47e4beb2f8420856e0bae01e11136c0b3a57c4a9 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Sun, 19 Feb 2023 11:01:11 +0100 Subject: [PATCH 3/3] Update translations --- locale/fr/LC_MESSAGES/django.mo | Bin 8688 -> 8923 bytes locale/fr/LC_MESSAGES/django.po | 16 ++++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo index 29daba959af995688ba6d103404ff1b1150f548f..598951704926a9e28fe062bf178ed65986a0ba9f 100644 GIT binary patch delta 3183 zcmZA2eN5F=9LMnk$b(ouTo5&RxQL?ofD(!UJ|tp_5I!qDWmmb{MG&}L5i-1*iK&06 zyR+u3md*Y!b<^F=)Ld?1ty$_yi>AwRbCnxeO;&DN_Wp3sZLBlDyv{lI+~4`0hu`)0 z={INiZ#jA#FqGXyGEv>bmYHul45 zn1Bl~71v=3wqly`8*_w;Cb-zuVa#u~-G{XGfCAJ?%d87fE5v6PPKxE1H%Mbw0eER#(!gHaQXL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EO_A_#pMI^8RY4a8O=m&hk(5gA0bZ!G-XU|(;fE7&_0li~e7 zrqjDA_7&fB><>Y63LSZQuDk-@FLCEWeWwz?3-*qu=6HWk?e+FL-t=XsjRpM!jwJPh diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 01645a900..579e93a33 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-02-19 10:29+0100\n" -"PO-Revision-Date: 2023-02-18 22:24+0100\n" +"PO-Revision-Date: 2023-02-19 11:00+0100\n" "Last-Translator: Didier Quirin \n" "Language-Team: \n" "Language: fr\n" @@ -61,27 +61,23 @@ msgstr "Expert" #: core/constants.py:65 msgid "Draft" -msgstr "" +msgstr "Brouillon" #: core/constants.py:66 -#, fuzzy -#| msgid "Validator" msgid "To validate" -msgstr "Validateur" +msgstr "A valider" #: core/constants.py:67 -#, fuzzy -#| msgid "Validator" msgid "Validated" -msgstr "Validateur" +msgstr "Validé" #: core/constants.py:68 msgid "Set aside" -msgstr "" +msgstr "Écarté temporairement" #: core/constants.py:69 msgid "Removed" -msgstr "" +msgstr "Écarté" #: core/constants.py:116 msgid "German"