Skip to content

Commit

Permalink
Fixed #5939 -- Added normalization for New Brunswick in the Canadian …
Browse files Browse the repository at this point in the history
…provinces.

Thanks, rajesh.dhawan@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6744 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Nov 29, 2007
1 parent e2b03bd commit 4cbc8c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ answer newbie questions, and generally made Django that much better:
Alex Dedul Alex Dedul
deric@monowerks.com deric@monowerks.com
Max Derkachev <mderk@yandex.ru> Max Derkachev <mderk@yandex.ru>
Rajesh Dhawan <rajesh.dhawan@gmail.com>
Sander Dijkhuis <sander.dijkhuis@gmail.com> Sander Dijkhuis <sander.dijkhuis@gmail.com>
Jordan Dimov <s3x3y1@gmail.com> Jordan Dimov <s3x3y1@gmail.com>
dne@mayonnaise.net dne@mayonnaise.net
Expand Down
2 changes: 2 additions & 0 deletions django/contrib/localflavor/ca/ca_provinces.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
'british columbia': 'BC', 'british columbia': 'BC',
'mb': 'MB', 'mb': 'MB',
'manitoba': 'MB', 'manitoba': 'MB',
'nb': 'NB',
'new brunswick': 'NB',
'nf': 'NF', 'nf': 'NF',
'newfoundland': 'NF', 'newfoundland': 'NF',
'newfoundland and labrador': 'NF', 'newfoundland and labrador': 'NF',
Expand Down
4 changes: 4 additions & 0 deletions tests/regressiontests/forms/localflavor/ca.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@
u'NS' u'NS'
>>> f.clean(' manitoba ') >>> f.clean(' manitoba ')
u'MB' u'MB'
>>> f.clean(' new brunswick ')
u'NB'
>>> f.clean('NB')
u'NB'
>>> f.clean('T2S 2H7') >>> f.clean('T2S 2H7')
Traceback (most recent call last): Traceback (most recent call last):
... ...
Expand Down

0 comments on commit 4cbc8c6

Please sign in to comment.