From b594678f945fa0e662d5333c4dd1cdfd2957e0b3 Mon Sep 17 00:00:00 2001 From: Guilouf Date: Thu, 9 Jan 2025 10:04:46 +0100 Subject: [PATCH] Fix migrations --- ...istoricalsiae_is_cocontracting_and_more.py | 18 ++++++----- lemarche/siaes/models.py | 2 +- ...ve_tender_accept_cocontracting_and_more.py | 31 ++++++++++++------- lemarche/tenders/models.py | 10 ++++-- 4 files changed, 37 insertions(+), 24 deletions(-) diff --git a/lemarche/siaes/migrations/0080_remove_historicalsiae_is_cocontracting_and_more.py b/lemarche/siaes/migrations/0080_remove_historicalsiae_is_cocontracting_and_more.py index ae44d7d69..311b35620 100644 --- a/lemarche/siaes/migrations/0080_remove_historicalsiae_is_cocontracting_and_more.py +++ b/lemarche/siaes/migrations/0080_remove_historicalsiae_is_cocontracting_and_more.py @@ -9,22 +9,24 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RemoveField( + migrations.RenameField( model_name="historicalsiae", - name="is_cocontracting", + old_name="is_cocontracting", + new_name="_is_cocontracting", ), - migrations.RemoveField( + migrations.RenameField( model_name="siae", - name="is_cocontracting", + old_name="is_cocontracting", + new_name="_is_cocontracting", ), - migrations.AddField( + migrations.AlterField( model_name="historicalsiae", name="_is_cocontracting", - field=models.BooleanField(default=False, verbose_name="Fonctionnalité désactivée"), + field=models.BooleanField(default=False, verbose_name="Co-traitance (Fonctionnalité désactivée)"), ), - migrations.AddField( + migrations.AlterField( model_name="siae", name="_is_cocontracting", - field=models.BooleanField(default=False, verbose_name="Fonctionnalité désactivée"), + field=models.BooleanField(default=False, verbose_name="Co-traitance (Fonctionnalité désactivée)"), ), ] diff --git a/lemarche/siaes/models.py b/lemarche/siaes/models.py index d0ded010f..06c7bba57 100644 --- a/lemarche/siaes/models.py +++ b/lemarche/siaes/models.py @@ -697,7 +697,7 @@ class Siae(models.Model): logo_url = models.URLField(verbose_name="Lien vers le logo", max_length=500, blank=True) is_consortium = models.BooleanField(verbose_name="Consortium", default=False) - _is_cocontracting = models.BooleanField(verbose_name="Fonctionnalité désactivée", default=False) + _is_cocontracting = models.BooleanField(verbose_name="Co-traitance (Fonctionnalité désactivée)", default=False) asp_id = models.IntegerField(verbose_name="ID ASP", blank=True, null=True) is_active = models.BooleanField( diff --git a/lemarche/tenders/migrations/0095_remove_tender_accept_cocontracting_and_more.py b/lemarche/tenders/migrations/0095_remove_tender_accept_cocontracting_and_more.py index f7d84869c..a12d387b4 100644 --- a/lemarche/tenders/migrations/0095_remove_tender_accept_cocontracting_and_more.py +++ b/lemarche/tenders/migrations/0095_remove_tender_accept_cocontracting_and_more.py @@ -9,31 +9,38 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RemoveField( + migrations.RenameField( model_name="tender", - name="accept_cocontracting", + old_name="accept_cocontracting", + new_name="_accept_cocontracting", ), - migrations.RemoveField( + migrations.RenameField( model_name="tender", - name="siae_detail_cocontracting_click_count", + old_name="siae_detail_cocontracting_click_count", + new_name="_siae_detail_cocontracting_click_count", ), - migrations.RemoveField( + migrations.RenameField( model_name="tendersiae", - name="detail_cocontracting_click_date", + old_name="detail_cocontracting_click_date", + new_name="_detail_cocontracting_click_date", ), - migrations.AddField( + migrations.AlterField( model_name="tender", name="_accept_cocontracting", - field=models.BooleanField(default=False, verbose_name="Archivé"), + field=models.BooleanField(default=False, verbose_name="Ouvert à la co-traitance (Archivé)"), ), - migrations.AddField( + migrations.AlterField( model_name="tender", name="_siae_detail_cocontracting_click_count", - field=models.IntegerField(default=0, verbose_name="Archivé"), + field=models.IntegerField( + default=0, verbose_name="Nombre de structures ouvertes à la co-traitance (Archivé)" + ), ), - migrations.AddField( + migrations.AlterField( model_name="tendersiae", name="_detail_cocontracting_click_date", - field=models.DateTimeField(blank=True, null=True, verbose_name="Archivé"), + field=models.DateTimeField( + blank=True, null=True, verbose_name="Date de clic sur Répondre en co-traitance (Archivé)" + ), ), ] diff --git a/lemarche/tenders/models.py b/lemarche/tenders/models.py index 53f4c1f44..aad297aaa 100644 --- a/lemarche/tenders/models.py +++ b/lemarche/tenders/models.py @@ -415,7 +415,7 @@ class Tender(models.Model): response_is_anonymous = models.BooleanField(verbose_name="Je souhaite rester anonyme", blank=False, default=False) _accept_cocontracting = models.BooleanField( - verbose_name="Archivé", + verbose_name="Ouvert à la co-traitance (Archivé)", default=False, ) @@ -652,7 +652,9 @@ class Tender(models.Model): siae_detail_contact_click_count = models.IntegerField( "Nombre de structures intéressées", help_text=RECALCULATED_FIELD_HELP_TEXT, default=0 ) - _siae_detail_cocontracting_click_count = models.IntegerField("Archivé", default=0) + _siae_detail_cocontracting_click_count = models.IntegerField( + "Nombre de structures ouvertes à la co-traitance (Archivé)", default=0 + ) siae_detail_not_interested_click_count = models.IntegerField( "Nombre de structures pas intéressées", help_text=RECALCULATED_FIELD_HELP_TEXT, default=0 ) @@ -1103,7 +1105,9 @@ class TenderSiae(models.Model): detail_contact_click_date = models.DateTimeField( verbose_name="Date de clic sur les coordonnées du besoin", blank=True, null=True ) - _detail_cocontracting_click_date = models.DateTimeField(verbose_name="Archivé", blank=True, null=True) + _detail_cocontracting_click_date = models.DateTimeField( + verbose_name="Date de clic sur Répondre en co-traitance (Archivé)", blank=True, null=True + ) detail_not_interested_click_date = models.DateTimeField( verbose_name="Date de clic sur Pas intéressé", blank=True, null=True )