Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14166 closed (fixed)

Indian states are not specified as a tuple of tuples

Reported by: Flavio Curella Owned by: nobody
Component: contrib.localflavor Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Indian states in in_states.py are specified as a simple tuple of single elements:

STATE_CHOICES = (
    'KA', 'Karnataka',
    'AP', 'Andhra Pradesh',
    'KL', 'Kerala',
    'TN', 'Tamil Nadu',

where it should be as a tuple of 2-elements tuple, as:

STATE_CHOICES = (
    ('KA', 'Karnataka'),
    ('AP', 'Andhra Pradesh'),
    ('KL', 'Kerala'),
    ('TN', 'Tamil Nadu'),

This result in a too many values to unpack error when using the class INStateSelect

Attachments (1)

in_states.diff (2.1 KB ) - added by Flavio Curella 14 years ago.

Download all attachments as: .zip

Change History (4)

by Flavio Curella, 14 years ago

Attachment: in_states.diff added

comment:1 by Łukasz Rekucki, 14 years ago

Triage Stage: UnreviewedReady for checkin

Bug is obvious and the patch is trivial, so marking it as RFC.

comment:2 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

(In [13656]) Fixed #14166 -- Modified the list of state choices in the Indian localflavor to be a list of tuples, not just a list of values. Thanks to gogna for the report and patch.

comment:3 by Russell Keith-Magee, 14 years ago

(In [13657]) [1.2.X] Fixed #14166 -- Modified the list of state choices in the Indian localflavor to be a list of tuples, not just a list of values. Thanks to gogna for the report and patch.

Backport of r13656 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top