From 4e891ed0bbcd8602402521a939cfc0797bb39f28 Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 29 Dec 2023 08:50:58 +0530 Subject: [PATCH] Update countries list --- utils/fields.py | 88 ++++++++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 38 deletions(-) diff --git a/utils/fields.py b/utils/fields.py index 48a606cc..ca1115de 100644 --- a/utils/fields.py +++ b/utils/fields.py @@ -1,7 +1,8 @@ from django.utils.translation import ugettext as _ from django.db import models -# http://xml.coverpages.org/country3166.html +# Old: http://xml.coverpages.org/country3166.html +# 2023-12-29: Updated list of countries from https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes COUNTRIES = ( ('AD', _('Andorra')), ('AE', _('United Arab Emirates')), @@ -10,7 +11,6 @@ COUNTRIES = ( ('AI', _('Anguilla')), ('AL', _('Albania')), ('AM', _('Armenia')), - ('AN', _('Netherlands Antilles')), ('AO', _('Angola')), ('AQ', _('Antarctica')), ('AR', _('Argentina')), @@ -18,6 +18,7 @@ COUNTRIES = ( ('AT', _('Austria')), ('AU', _('Australia')), ('AW', _('Aruba')), + ('AX', _('Aland Islands')), ('AZ', _('Azerbaijan')), ('BA', _('Bosnia and Herzegovina')), ('BB', _('Barbados')), @@ -28,11 +29,13 @@ COUNTRIES = ( ('BH', _('Bahrain')), ('BI', _('Burundi')), ('BJ', _('Benin')), + ('BL', _('St. Barts')), ('BM', _('Bermuda')), - ('BN', _('Brunei Darussalam')), + ('BN', _('Brunei')), ('BO', _('Bolivia')), + ('BQ', _('Caribbean Netherlands')), ('BR', _('Brazil')), - ('BS', _('Bahama')), + ('BS', _('Bahamas')), ('BT', _('Bhutan')), ('BV', _('Bouvet Island')), ('BW', _('Botswana')), @@ -40,11 +43,12 @@ COUNTRIES = ( ('BZ', _('Belize')), ('CA', _('Canada')), ('CC', _('Cocos (Keeling) Islands')), + ('CD', _('Congo - Kinshasa')), ('CF', _('Central African Republic')), - ('CG', _('Congo')), + ('CG', _('Congo - Brazzaville')), ('CH', _('Switzerland')), ('CI', _('Ivory Coast')), - ('CK', _('Cook Iislands')), + ('CK', _('Cook Islands')), ('CL', _('Chile')), ('CM', _('Cameroon')), ('CN', _('China')), @@ -52,9 +56,10 @@ COUNTRIES = ( ('CR', _('Costa Rica')), ('CU', _('Cuba')), ('CV', _('Cape Verde')), + ('CW', _('Curacao')), ('CX', _('Christmas Island')), ('CY', _('Cyprus')), - ('CZ', _('Czech Republic')), + ('CZ', _('Czechia')), ('DE', _('Germany')), ('DJ', _('Djibouti')), ('DK', _('Denmark')), @@ -70,16 +75,16 @@ COUNTRIES = ( ('ET', _('Ethiopia')), ('FI', _('Finland')), ('FJ', _('Fiji')), - ('FK', _('Falkland Islands (Malvinas)')), + ('FK', _('Falkland Islands')), ('FM', _('Micronesia')), ('FO', _('Faroe Islands')), ('FR', _('France')), - ('FX', _('France, Metropolitan')), ('GA', _('Gabon')), - ('GB', _('United Kingdom (Great Britain)')), + ('GB', _('United Kingdom')), ('GD', _('Grenada')), ('GE', _('Georgia')), ('GF', _('French Guiana')), + ('GG', _('Guernsey')), ('GH', _('Ghana')), ('GI', _('Gibraltar')), ('GL', _('Greenland')), @@ -93,7 +98,7 @@ COUNTRIES = ( ('GU', _('Guam')), ('GW', _('Guinea-Bissau')), ('GY', _('Guyana')), - ('HK', _('Hong Kong')), + ('HK', _('Hong Kong SAR China')), ('HM', _('Heard & McDonald Islands')), ('HN', _('Honduras')), ('HR', _('Croatia')), @@ -102,12 +107,14 @@ COUNTRIES = ( ('ID', _('Indonesia')), ('IE', _('Ireland')), ('IL', _('Israel')), + ('IM', _('Isle of Man')), ('IN', _('India')), ('IO', _('British Indian Ocean Territory')), ('IQ', _('Iraq')), - ('IR', _('Islamic Republic of Iran')), + ('IR', _('Iran')), ('IS', _('Iceland')), ('IT', _('Italy')), + ('JE', _('Jersey')), ('JM', _('Jamaica')), ('JO', _('Jordan')), ('JP', _('Japan')), @@ -117,14 +124,14 @@ COUNTRIES = ( ('KI', _('Kiribati')), ('KM', _('Comoros')), ('KN', _('St. Kitts and Nevis')), - ('KP', _('Korea, Democratic People\'s Republic of')), - ('KR', _('Korea, Republic of')), + ('KP', _('North Korea')), + ('KR', _('South Korea')), ('KW', _('Kuwait')), ('KY', _('Cayman Islands')), ('KZ', _('Kazakhstan')), - ('LA', _('Lao People\'s Democratic Republic')), + ('LA', _('Laos')), ('LB', _('Lebanon')), - ('LC', _('Saint Lucia')), + ('LC', _('St. Lucia')), ('LI', _('Liechtenstein')), ('LK', _('Sri Lanka')), ('LR', _('Liberia')), @@ -132,20 +139,23 @@ COUNTRIES = ( ('LT', _('Lithuania')), ('LU', _('Luxembourg')), ('LV', _('Latvia')), - ('LY', _('Libyan Arab Jamahiriya')), + ('LY', _('Libya')), ('MA', _('Morocco')), ('MC', _('Monaco')), - ('MD', _('Moldova, Republic of')), + ('MD', _('Moldova')), + ('ME', _('Montenegro')), + ('MF', _('St. Martin')), ('MG', _('Madagascar')), ('MH', _('Marshall Islands')), + ('MK', _('North Macedonia')), ('ML', _('Mali')), + ('MM', _('Myanmar (Burma)')), ('MN', _('Mongolia')), - ('MM', _('Myanmar')), - ('MO', _('Macau')), + ('MO', _('Macao SAR China')), ('MP', _('Northern Mariana Islands')), ('MQ', _('Martinique')), ('MR', _('Mauritania')), - ('MS', _('Monserrat')), + ('MS', _('Montserrat')), ('MT', _('Malta')), ('MU', _('Mauritius')), ('MV', _('Maldives')), @@ -174,15 +184,17 @@ COUNTRIES = ( ('PK', _('Pakistan')), ('PL', _('Poland')), ('PM', _('St. Pierre & Miquelon')), - ('PN', _('Pitcairn')), + ('PN', _('Pitcairn Islands')), ('PR', _('Puerto Rico')), + ('PS', _('Palestinian Territories')), ('PT', _('Portugal')), ('PW', _('Palau')), ('PY', _('Paraguay')), ('QA', _('Qatar')), ('RE', _('Reunion')), ('RO', _('Romania')), - ('RU', _('Russian Federation')), + ('RS', _('Serbia')), + ('RU', _('Russia')), ('RW', _('Rwanda')), ('SA', _('Saudi Arabia')), ('SB', _('Solomon Islands')), @@ -192,17 +204,19 @@ COUNTRIES = ( ('SG', _('Singapore')), ('SH', _('St. Helena')), ('SI', _('Slovenia')), - ('SJ', _('Svalbard & Jan Mayen Islands')), + ('SJ', _('Svalbard and Jan Mayen')), ('SK', _('Slovakia')), ('SL', _('Sierra Leone')), ('SM', _('San Marino')), ('SN', _('Senegal')), ('SO', _('Somalia')), ('SR', _('Suriname')), + ('SS', _('South Sudan')), ('ST', _('Sao Tome & Principe')), ('SV', _('El Salvador')), - ('SY', _('Syrian Arab Republic')), - ('SZ', _('Swaziland')), + ('SX', _('Sint Maarten')), + ('SY', _('Syria')), + ('SZ', _('Eswatini')), ('TC', _('Turks & Caicos Islands')), ('TD', _('Chad')), ('TF', _('French Southern Territories')), @@ -210,36 +224,34 @@ COUNTRIES = ( ('TH', _('Thailand')), ('TJ', _('Tajikistan')), ('TK', _('Tokelau')), + ('TL', _('Timor-Leste')), ('TM', _('Turkmenistan')), ('TN', _('Tunisia')), ('TO', _('Tonga')), - ('TP', _('East Timor')), ('TR', _('Turkey')), ('TT', _('Trinidad & Tobago')), ('TV', _('Tuvalu')), - ('TW', _('Taiwan, Province of China')), - ('TZ', _('Tanzania, United Republic of')), + ('TW', _('Taiwan')), + ('TZ', _('Tanzania')), ('UA', _('Ukraine')), ('UG', _('Uganda')), - ('UM', _('United States Minor Outlying Islands')), - ('US', _('United States of America')), + ('UM', _('U.S. Outlying Islands')), + ('US', _('United States')), ('UY', _('Uruguay')), ('UZ', _('Uzbekistan')), - ('VA', _('Vatican City State (Holy See)')), - ('VC', _('St. Vincent & the Grenadines')), + ('VA', _('Vatican City')), + ('VC', _('St. Vincent & Grenadines')), ('VE', _('Venezuela')), ('VG', _('British Virgin Islands')), - ('VI', _('United States Virgin Islands')), - ('VN', _('Viet Nam')), + ('VI', _('U.S. Virgin Islands')), + ('VN', _('Vietnam')), ('VU', _('Vanuatu')), - ('WF', _('Wallis & Futuna Islands')), + ('WF', _('Wallis & Futuna')), ('WS', _('Samoa')), ('YE', _('Yemen')), ('YT', _('Mayotte')), - ('YU', _('Yugoslavia')), ('ZA', _('South Africa')), ('ZM', _('Zambia')), - ('ZR', _('Zaire')), ('ZW', _('Zimbabwe')), )