mirror of
https://github.com/django/django.git
synced 2025-10-29 16:46:11 +00:00
Fixed #15623 -- Corrected province codes for Canadian localflavor. Thanks to shelldweller for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -8,13 +8,18 @@ Source: http://www.canada.gc.ca/othergov/prov_e.html
|
||||
This exists in this standalone file so that it's only imported into memory
|
||||
when explicitly needed.
|
||||
"""
|
||||
import warnings
|
||||
warnings.warn(
|
||||
'There have been recent changes to the CA localflavor. See the release notes for details',
|
||||
RuntimeWarning
|
||||
)
|
||||
|
||||
PROVINCE_CHOICES = (
|
||||
('AB', 'Alberta'),
|
||||
('BC', 'British Columbia'),
|
||||
('MB', 'Manitoba'),
|
||||
('NB', 'New Brunswick'),
|
||||
('NF', 'Newfoundland and Labrador'),
|
||||
('NL', 'Newfoundland and Labrador'),
|
||||
('NT', 'Northwest Territories'),
|
||||
('NS', 'Nova Scotia'),
|
||||
('NU', 'Nunavut'),
|
||||
@@ -22,7 +27,7 @@ PROVINCE_CHOICES = (
|
||||
('PE', 'Prince Edward Island'),
|
||||
('QC', 'Quebec'),
|
||||
('SK', 'Saskatchewan'),
|
||||
('YK', 'Yukon')
|
||||
('YT', 'Yukon')
|
||||
)
|
||||
|
||||
PROVINCES_NORMALIZED = {
|
||||
@@ -35,9 +40,10 @@ PROVINCES_NORMALIZED = {
|
||||
'manitoba': 'MB',
|
||||
'nb': 'NB',
|
||||
'new brunswick': 'NB',
|
||||
'nf': 'NF',
|
||||
'newfoundland': 'NF',
|
||||
'newfoundland and labrador': 'NF',
|
||||
'nf': 'NL',
|
||||
'nl': 'NL',
|
||||
'newfoundland': 'NL',
|
||||
'newfoundland and labrador': 'NL',
|
||||
'nt': 'NT',
|
||||
'northwest territories': 'NT',
|
||||
'ns': 'NS',
|
||||
@@ -54,6 +60,8 @@ PROVINCES_NORMALIZED = {
|
||||
'quebec': 'QC',
|
||||
'sk': 'SK',
|
||||
'saskatchewan': 'SK',
|
||||
'yk': 'YK',
|
||||
'yukon': 'YK',
|
||||
'yk': 'YT',
|
||||
'yt': 'YT',
|
||||
'yukon': 'YT',
|
||||
'yukon territory': 'YT',
|
||||
}
|
||||
Reference in New Issue
Block a user