Ticket #17798: ca_provinces.py.patch

File ca_provinces.py.patch, 1.7 KB (added by Sergiy Kuzmenko, 13 years ago)

Patch with test and doc

  • django/contrib/localflavor/ca/ca_provinces.py

     
    88This exists in this standalone file so that it's only imported into memory
    99when explicitly needed.
    1010"""
    11 import warnings
    12 warnings.warn(
    13     'There have been recent changes to the CA localflavor. See the release notes for details',
    14     RuntimeWarning
    15 )
    1611
    1712PROVINCE_CHOICES = (
    1813    ('AB', 'Alberta'),
     
    5651    'pei': 'PE',
    5752    'p.e.i.': 'PE',
    5853    'prince edward island': 'PE',
     54    'pq' : 'QC',
    5955    'qc': 'QC',
    6056    'quebec': 'QC',
    6157    'sk': 'SK',
  • docs/releases/1.4.txt

     
    621621  company. It can be useful in testing scenarios where e.g. no database
    622622  interaction is needed. See :ref:`testcase_hierarchy_diagram`.
    623623
     624* Localflavor change for Canada: "pq" (an old abbreviation for Quebec) is
     625  added to PROVINCES_NORMALIZED
     626
    624627Backwards incompatible changes in 1.4
    625628=====================================
    626629
  • tests/regressiontests/localflavor/ca/tests.py

     
    9393            'BC': 'BC',
    9494            'nova scotia': 'NS',
    9595            '  manitoba ': 'MB',
     96            'pq': 'QC',
    9697        }
    9798        invalid = {
    9899            'T2S 2H7': error_format,
Back to Top