Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#10308 closed (wontfix)

us_states.STATE_CHOICES is missing AA, AE, AP, MH, PW

Reported by: MonteDavidoff Owned by: nobody
Component: contrib.localflavor Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

According to the official list of state abbreviations defined by the USPS, http://www.usps.com/ncsc/lookups/usps_abbreviations.html, django.contrib.localflavor.us.us_states is missing these abbreviations: AA, AE, AP, MH, and PW.

AA Armed Forces Americas
AE Armed Forces Europe / Canada / Middle East / Africa
AP Armed Forces Pacific
FM Federated States of Micronesia
MH Marshall Islands
PW Palau

Please note that the attached patch file also contains the fix for ticket #10307 (FM inconsistency).

Attachments (1)

us_states.py.diff (2.4 KB) - added by MonteDavidoff 8 years ago.

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by MonteDavidoff

Attachment: us_states.py.diff added

comment:1 Changed 8 years ago by Russell Keith-Magee

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: wontfix
Status: newclosed

This exact patch was _removed_ in [8550], as part of #8425. This is a situation where we can't keep everyone happy, so we've opted for a minimum common set. If your requirements include PW,FM,NH etc, then it isn't hard to extend the basic widget to provide the extra choices.

comment:2 Changed 8 years ago by Russell Keith-Magee

The Armed forces postal codes are covered in a separate ticket: #9022. I'm not completely convinced we should include those, either, but I'll leave that decision to someone with an interest in US postal requirements.

comment:3 Changed 8 years ago by Adrian Holovaty

The intent here is to provide a list of the 50 states. For anything beyond that, you can just use a custom field.

comment:4 Changed 8 years ago by MonteDavidoff

Thank you for the explanation. I now understand and agree with the intent.

comment:5 Changed 8 years ago by Daniel Pope <dan@…>

I also have no interest in this, though I brought it up in #9022 because I read that missing state codes bites people frequently. It's the kind of omission that a lot of developers make by mistake and which frustrate users. Just seems sensible to me that Django could help developers stay on top of this either by allowing these or simply by documenting that this is not a comprehensive list for postal purposes.

comment:6 Changed 6 years ago by James Bennett

(In [15029]) Refactor the choices for localflavor's USStateField, and add new US postal code support. Fixes #14937 and #9022, refs #10308 and #8425.

Note: See TracTickets for help on using tickets.
Back to Top