When setting `COUNTRIES_OVERRIDE`, allow custom flag_url
kunambi opened this issue · comments
Thomas Kunambi commented
Because of Django compability issues in django-modeltranslation
, the Indonesian language has the code ind
rather than id
. In order for our project to mesh well with django-countries
we're using COUNTRIES_OVERRIDE
like so:
COUNTRIES_OVERRIDE = {
"ID": None,
"IND": {
"names": [
_("Indonesia"),
],
"ioc_code": "INA",
},
}
This works very well.
However, when we want to display the flag it automatically is looking for flags/ind.gif
which of course returns a 404. Would love if we could set a custom flag_url
in the complex dictionary format, e.g.:
COUNTRIES_OVERRIDE = {
"ID": None,
"IND": {
"names": [
_("Indonesia"),
],
"ioc_code": "INA",
"flag_url": "flags/id.gif",
},
}
TYIA
Chris Beaven commented
Sure, seems like a valid enhancement.