UK localflavor mis-named/documentation bug.
|Reported by:||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.
Change History (12)
Changed 6 years ago by schinckel
comment:1 Changed 6 years ago by russellm
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:3 Changed 6 years ago by julien
- Component changed from Contrib apps to django.contrib.localflavor