summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-05-10 22:19:01 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-05-10 22:19:01 +0200
commit46648b641d86b663f825227df5af5473f13a3fb4 (patch)
tree4fcee3d0f2fa3980598da16b3d55ed619a895952
parent73f7d346997d9520ea672b4f311349d7ba8b9075 (diff)
Fixed #17798 -- Tweaked the CA localflavor.
Thanks shelldweller.
-rw-r--r--django/contrib/localflavor/ca/ca_provinces.py6
-rw-r--r--docs/releases/1.5.txt3
-rw-r--r--tests/regressiontests/localflavor/ca/tests.py1
3 files changed, 5 insertions, 5 deletions
diff --git a/django/contrib/localflavor/ca/ca_provinces.py b/django/contrib/localflavor/ca/ca_provinces.py
index 505d863f5e..884668a9fd 100644
--- a/django/contrib/localflavor/ca/ca_provinces.py
+++ b/django/contrib/localflavor/ca/ca_provinces.py
@@ -8,11 +8,6 @@ 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'),
@@ -56,6 +51,7 @@ PROVINCES_NORMALIZED = {
'pei': 'PE',
'p.e.i.': 'PE',
'prince edward island': 'PE',
+ 'pq' : 'QC',
'qc': 'QC',
'quebec': 'QC',
'sk': 'SK',
diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt
index 5a92e7d861..677aac7f2b 100644
--- a/docs/releases/1.5.txt
+++ b/docs/releases/1.5.txt
@@ -44,6 +44,9 @@ Django 1.5 also includes several smaller improvements worth noting:
* :mod:`django.utils.timezone` provides a helper for converting aware
datetimes between time zones. See :func:`~django.utils.timezone.localtime`.
+* In the localflavor for Canada, "pq" was added to the acceptable codes for
+ Quebec. It's an old abbreviation.
+
Backwards incompatible changes in 1.5
=====================================
diff --git a/tests/regressiontests/localflavor/ca/tests.py b/tests/regressiontests/localflavor/ca/tests.py
index 05d2fe2ac4..903321b2cd 100644
--- a/tests/regressiontests/localflavor/ca/tests.py
+++ b/tests/regressiontests/localflavor/ca/tests.py
@@ -93,6 +93,7 @@ class CALocalFlavorTests(SimpleTestCase):
'BC': 'BC',
'nova scotia': 'NS',
' manitoba ': 'MB',
+ 'pq': 'QC',
}
invalid = {
'T2S 2H7': error_format,