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)
Change History (8)
comment:1 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 15 years ago
Attachment: | 11537.diff added |
---|
comment:2 by , 15 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
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 , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:4 by , 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:7 by , 12 years ago
Keywords: | localflavorsplit added |
---|---|
Resolution: | → invalid |
Status: | assigned → closed |
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!
Patch cleans up the STATE_CHOICES and adds a test