Code

Opened 5 years ago

Closed 18 months ago

#11537 closed Bug (invalid)

localflavor for india's state choices are not tuples

Reported by: zbyte64 Owned by: lars
Component: contrib.localflavor Version: master
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 5 years ago.
Patch cleans up the STATE_CHOICES and adds a test

Download all attachments as: .zip

Change History (8)

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 5 years ago by lars

Patch cleans up the STATE_CHOICES and adds a test

comment:2 Changed 5 years ago by lars

  • Has patch set
  • Owner changed from nobody to lars
  • Status changed from new to 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 Changed 3 years ago by julien

  • Severity set to Normal
  • Type set to Bug

comment:4 Changed 3 years ago by julien

  • 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 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:6 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:7 Changed 18 months ago by aaugustin

  • Keywords localflavorsplit added
  • Resolution set to invalid
  • Status changed from assigned to 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!

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.