Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

US State vs US Postal Code #55

Closed
Nelluk opened this issue Nov 6, 2013 · 7 comments
Closed

US State vs US Postal Code #55

Nelluk opened this issue Nov 6, 2013 · 7 comments
Labels
Milestone

Comments

@Nelluk
Copy link

Nelluk commented Nov 6, 2013

class USStateField(CharField):
    description = _("U.S. state (two uppercase letters)")

class USPostalCodeField(CharField):
    description = ("U.S. postal code (two uppercase letters)")
    kwargs['maxlength'] = 2

Shouldn't the postal code field contain digits? Seems like it was accidentally copied from the State field.

@charettes
Copy link
Member

Reading from the doc string of USPostalCodeField it seems that it represents the USPS code which is also a two uppercase letters format to represent states.

Note that a the USCG and USPS of state might differ. i.e. The USCG code of California is CF while it's USPS code is CA.

@bryanveloso
Copy link
Member

I think the issue here is that "Postal Code" and "ZIP code" are interchangeable in the American lexicon, hence the concern brought forth by the OP. Something USPostalServiceCodeField would probably be less confusing.

@bryanveloso bryanveloso reopened this Nov 7, 2013
@mxsasha
Copy link
Member

mxsasha commented Feb 23, 2014

I can see your concern, but I don't think it's serious enough for everyone to rename references to this field. Perhaps you could submit a pull request with a clarified description, or something along those lines?

@ubernostrum
Copy link
Member

The "postal code" field, historically, has its name because it accepts all codes the US Postal Service recognizes as "states", even though many of those codes represent places which are not US states (in fact some represent sovereign nations for which the US provides postal services).

Any attempt at a better name must avoid the politically-sensitive issue of referring to those as "states".

@jezdez jezdez added the bug label Oct 1, 2014
@tobiasmcnulty
Copy link
Member

Part of the confusion may be that there is no model field for US zip codes, so people see see the USPostalCodeField and assume it's a zip code. Is there a reason such a model field doesn't exist?

@jezdez jezdez closed this as completed in 4d4c5a2 Nov 2, 2014
@jezdez
Copy link
Contributor

jezdez commented Nov 2, 2014

Thanks for the suggestion @tobiasmcnulty, I hope 4d4c5a2 suffices to close this issue for good.

@tobiasmcnulty
Copy link
Member

@jezdez Does for me; thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants