Skip to content

Commit

Permalink
[FA] [Post-Launch] Rename fields in Petition snippet - Part 3 (#11096)
Browse files Browse the repository at this point in the history
* Remove old fields

* Rename migrations
  • Loading branch information
jhonatan-lopes authored Sep 13, 2023
1 parent 6bcd586 commit 71e1613
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -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",
),
]
23 changes: 0 additions & 23 deletions network-api/networkapi/wagtailpages/pagemodels/campaigns.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 71e1613

Please sign in to comment.