1
0
mirror of https://github.com/django/django.git synced 2024-12-24 18:16:19 +00:00

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
This commit is contained in:
Jannis Leidel 2010-12-26 11:45:11 +00:00
parent 3e00cf1f09
commit 4b2b2eda24
2 changed files with 5 additions and 2 deletions

View File

@ -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',

View File

@ -13,6 +13,9 @@ class USLocalFlavorTests(LocalFlavorTestCase):
<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>