#15813: STATES_NORMALIZED dict for India does not include all states
----------------------------------+------------------------------------
 Reporter:  jsdalton              |         Owner:  nobody
     Type:  Cleanup/optimization  |        Status:  new
Milestone:  1.4                   |     Component:  contrib.localflavor
  Version:  SVN                   |      Severity:  Normal
 Keywords:                        |  Triage Stage:  Unreviewed
Has patch:  0                     |
----------------------------------+------------------------------------
 I got bit today by an inconsitency in the implementation of the
 STATES_NORMALIZED dictionary for India as compared with the U.S. and
 Canada. (These are the only three countries which offer this dictionary.

 My assumption is that the purpose of this dictionary is to help normalize
 user input to the correct two letter state abbreviation. For both the U.S.
 and Canada, this dictionary maps every two-letter abbreviation to the
 normalized version (e.g.. "bc" -> "BC"), every complete spelling to the
 normalized version (e.g. "british columbia" -> "BC") and common
 misspellings or abbreviations to the normalized version (e.g. "calif" ->
 "CA"). Makes sense.

 The STATES_NORMALIZED dict in India does not do this though. It *only*
 maps a handful of abbreviations and misspellings, but does not
 comprehensively map each two letter abbreviation and each state.

 I implemented some logic that assumed it worked like the U.S. and Canada
 and got a complaint from a user registering from Gujarat who could not do
 so, because no mapping is included for it. Yikes!

 I humbly propose we extend STATES_NORMALIZED for India with all two letter
 abbreviations and spelled out state names. If there is a reason not to do
 this, I'd like to hear it. Otherwise, my patch is attached.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15813>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to