UK localflavor mis-named/documentation bug.
|Reported by:||Matthew Schinckel||Owned by:||nobody|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The documentation for localflavor states that:
Inside that package, country- or culture-specific code is organized into subpackages, named using ISO 3166 country codes.
However, the ISO 3166 code for the United Kingdom is actually GB. Thus, anything that uses ISO 3166 codes to store countries (such as django-countries) will be unable to automatically get the correct localflavor information.
Since changing this would break existing code, perhaps there could be another gb module that just shadows the uk module.
For instance, in gb/forms.py, we might have:
from django.contrib.localflavor import uk GBPostcodeField = uk.UKPostcodeField GBCountySelect = uk.UKCountySelect GBNationSelect = uk.UKNationSelect
This means that all is needed is this file, and any changes to the uk one will also apply to gb.