Opened 15 years ago

Closed 12 years ago

#11537 closed Bug (invalid)

localflavor for india's state choices are not tuples

Reported by: zbyte64 Owned by: lars
Component: contrib.localflavor Version: dev
Severity: Normal Keywords: localflavorsplit
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

See: http://code.djangoproject.com/browser/django/trunk/django/contrib/localflavor/in_/in_states.py

The STATE_CHOICES should be an iterable of tuples to be consistent with the rest of localflavor.

Attachments (1)

11537.diff (10.6 KB ) - added by lars 15 years ago.
Patch cleans up the STATE_CHOICES and adds a test

Download all attachments as: .zip

Change History (8)

comment:1 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedAccepted

by lars, 15 years ago

Attachment: 11537.diff added

Patch cleans up the STATE_CHOICES and adds a test

comment:2 by lars, 15 years ago

Has patch: set
Owner: changed from nobody to lars
Status: newassigned

This should fix this ticket and at least bring it in line with the current status of the other localflavors.

The state Uttaranchal has been renamed to Uttarakhand in 2007. With this change the license plate has changed from UA to UK. As people might rely on UA as a key in their databases I didn't change this one. The ISO code is yet another one (UL). The documentation says "Input is normalized to the standard two-letter vehicle registration abbreviation for the given state or territory." so this is not really 100% true at the moment. But as I'm not from India and I don't know how important this change is I left it as it was.

comment:3 by Julien Phalip, 14 years ago

Severity: Normal
Type: Bug

comment:4 by Julien Phalip, 14 years ago

Patch needs improvement: set

Thanks a lot for this. Could you please rewrite the tests using unittest before we can check this in?

comment:5 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:7 by Aymeric Augustin, 12 years ago

Keywords: localflavorsplit added
Resolution: invalid
Status: assignedclosed

django.contrib.localflavor is now deprecated — see https://docs.djangoproject.com/en/dev/ref/contrib/localflavor/

A repository was created for each localflavor at https://github.com/django/django-localflavor-? (Replace with the country code.)

If you're still interested in this ticket, could you create a pull request on that repository?

Sorry for not resolving this issue earlier, and thanks for your input!

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