diff --git a/django/contrib/localflavor/us/us_states.py b/django/contrib/localflavor/us/us_states.py index 1174218cc0..f1a3d73aaf 100644 --- a/django/contrib/localflavor/us/us_states.py +++ b/django/contrib/localflavor/us/us_states.py @@ -152,10 +152,10 @@ OBSOLETE_STATES = ( # 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', diff --git a/tests/regressiontests/forms/localflavor/us.py b/tests/regressiontests/forms/localflavor/us.py index 65dd1bb084..cde97c8743 100644 --- a/tests/regressiontests/forms/localflavor/us.py +++ b/tests/regressiontests/forms/localflavor/us.py @@ -13,6 +13,9 @@ class USLocalFlavorTests(LocalFlavorTestCase): + + +