From 71e1613553d03936a320ad587e6cd9c82e463ad3 Mon Sep 17 00:00:00 2001 From: Jhonatan Lopes Date: Wed, 13 Sep 2023 10:59:35 -0300 Subject: [PATCH] [FA] [Post-Launch] Rename fields in Petition snippet - Part 3 (#11096) * Remove old fields * Rename migrations --- .../0102_pni_petition_remove_old_fields.py | 24 +++++++++++++++++++ .../wagtailpages/pagemodels/campaigns.py | 23 ------------------ 2 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 network-api/networkapi/wagtailpages/migrations/0102_pni_petition_remove_old_fields.py diff --git a/network-api/networkapi/wagtailpages/migrations/0102_pni_petition_remove_old_fields.py b/network-api/networkapi/wagtailpages/migrations/0102_pni_petition_remove_old_fields.py new file mode 100644 index 00000000000..f7f5ac5e7ba --- /dev/null +++ b/network-api/networkapi/wagtailpages/migrations/0102_pni_petition_remove_old_fields.py @@ -0,0 +1,24 @@ +# Generated by Django 3.2.20 on 2023-09-04 19:21 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("wagtailpages", "0101_pni_petition_data_migration"), + ] + + operations = [ + migrations.RemoveField( + model_name="petition", + name="comment_requirements", + ), + migrations.RemoveField( + model_name="petition", + name="requires_country_code", + ), + migrations.RemoveField( + model_name="petition", + name="requires_postal_code", + ), + ] diff --git a/network-api/networkapi/wagtailpages/pagemodels/campaigns.py b/network-api/networkapi/wagtailpages/pagemodels/campaigns.py index ec7187665d6..2acf81de16c 100644 --- a/network-api/networkapi/wagtailpages/pagemodels/campaigns.py +++ b/network-api/networkapi/wagtailpages/pagemodels/campaigns.py @@ -187,29 +187,6 @@ class Petition(TranslatableMixin, CTA): help_text="This toggles the visibility of the optional comment field.", ) - requires_country_code = models.BooleanField( - default=False, - help_text="Will this petition require users to specify their country?", - ) - - requires_postal_code = models.BooleanField( - default=False, - help_text="Will this petition require users to specify their postal code?", - ) - - COMMENT_CHOICES = ( - ("none", "No comments"), - ("optional", "Optional comments"), - ("required", "Required comments"), - ) - - comment_requirements = models.CharField( - choices=COMMENT_CHOICES, - default="none", - help_text="What is the comments policy for this petition?", - max_length=8, - ) - checkbox_1 = models.CharField( editable=False, max_length=1024,