Add PCM carrier-route postcard pick-and-send (#16)
## Summary Closes #15. Mirrors westfarn/web_django_template#11. - Compose can target the postcard mailing list **or** find and select one or two USPS carrier routes by ZIP (optional radius). - Estimated cost is shown per route and for the selection (PCM design pricing, else `PCM_POSTCARD_PRICE_*` fallback). - Selected routes order through PCM `POST /order/postcard/with-list-count` — occupant addresses are not imported into Contacts. - Not official EDDM postage; PCM FirstClass/Standard purchased occupant lists on carrier routes. ## Test plan - [ ] Campaign compose: mailing-list audience still quotes list size × per-piece cost. - [ ] Switch to USPS carrier routes, search ZIP 60540 (mocked or live PCM), pick 1–2 routes, confirm household count + estimated cost. - [ ] Saving without a selection is rejected; saving with a quote creates one contact-less Message and shows the route panel on the report. - [ ] Send places `/order/postcard/with-list-count` (not per-recipient `/order/postcard`). - [ ] `uv run python manage.py test messaging.tests.CarrierRoutePostcardTests messaging.tests.PostcardDesignPickTests` Reviewed-on: #16
This commit was merged in pull request #16.
This commit is contained in:
1 parent
a867a57750
commit
045e956011
17 files changed
+1211
-28
No files matched your search
@@ -0,0 +1,41 @@
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("messaging", "0006_storedfile_social_kinds"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="campaign",
|
||||
name="route_targeting",
|
||||
field=models.JSONField(blank=True, default=dict),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="campaign",
|
||||
name="audience",
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
choices=[
|
||||
("email_opt_in", "Mailing list · email opt-in"),
|
||||
("sms_opt_in", "Mailing list · SMS opt-in"),
|
||||
("postcard_opt_in", "Mailing list · postcard opt-in"),
|
||||
("carrier_route", "USPS carrier routes"),
|
||||
],
|
||||
default="",
|
||||
max_length=32,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="message",
|
||||
name="contact",
|
||||
field=models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=models.CASCADE,
|
||||
related_name="messages",
|
||||
to="contacts.contact",
|
||||
),
|
||||
),
|
||||
]
|
||||
Reference in new issue
Block a user