Opened 15 years ago
Closed 15 years ago
#14937 closed (fixed)
US localflavor postal abbreviations
| Reported by: | James Bennett | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.localflavor | Version: | 1.2 |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | |
| Needs tests: | Patch needs improvement: | ||
| Easy pickings: | UI/UX: |
Description
Building on #9022 and the ongoing fallout from #8425, we really should provide a way to represent all abbreviations recognized by the US Postal Service without causing an international incident.
The attached patch does this by breaking down the choices into multiple fine-grained lists. It is backwards compatible in that its version of STATE_CHOICES contains all the choices present in the current STATE_CHOICES, but adds the following:
STATE_CHOICESnow also contains Armed Forces "state" abbreviations.- A new tuple,
USPS_CHOICES, contains all recognized USPS abbreviations, including independent nations which receive postal service from the United States. - A new model field (
USPostalCodeField) and form field (USPSSelect) are added, taking advantage of the newUSPS_CHOICEStuple. - Individual choice tuples are provided for: the "lower 48" states plus DC; all 50 states plus DC; all US territories; all US armed forces "states"; independent nations serviced by USPS; and obsolete abbreviations formerly recognized by USPS (e.g., the Panama Canal Zone).
Attachments (2)
Change History (3)
by , 15 years ago
| Attachment: | us_postal_codes.diff added |
|---|
by , 15 years ago
| Attachment: | us_postal_codes_2.diff added |
|---|
Note:
See TracTickets
for help on using tickets.
Correct a typo in original patch