Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated list of US states and tests after r15029 to be sorted correctly.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15058 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4b2b2eda240785dd5146be04ce7357b870ea807a 1 parent 3e00cf1
@jezdez jezdez authored
View
4 django/contrib/localflavor/us/us_states.py
@@ -152,10 +152,10 @@
# All US states and territories plus DC and military mail.
-STATE_CHOICES = US_STATES + US_TERRITORIES + ARMED_FORCES_STATES
+STATE_CHOICES = sorted(US_STATES + US_TERRITORIES + ARMED_FORCES_STATES, key=lambda obj: obj[1])
# All US Postal Service locations.
-USPS_CHOICES = US_STATES + US_TERRITORIES + ARMED_FORCES_STATES + COFA_STATES
+USPS_CHOICES = sorted(US_STATES + US_TERRITORIES + ARMED_FORCES_STATES + COFA_STATES, key=lambda obj: obj[1])
STATES_NORMALIZED = {
'ak': 'AK',
View
3  tests/regressiontests/forms/localflavor/us.py
@@ -13,6 +13,9 @@ def test_USStateSelect(self):
<option value="AS">American Samoa</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
+<option value="AA">Armed Forces Americas</option>
+<option value="AE">Armed Forces Europe</option>
+<option value="AP">Armed Forces Pacific</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
Please sign in to comment.
Something went wrong with that request. Please try again.