Skip to content

Commit 73a0dcd

Browse files
committed
Aggregation pattern implemented
1 parent 133a4ef commit 73a0dcd

File tree

2 files changed

+337
-1
lines changed

2 files changed

+337
-1
lines changed
Lines changed: 336 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,336 @@
1+
{
2+
"Afghanistan" : "AF",
3+
"Åland Islands" : "AX",
4+
"Albania" : "AL",
5+
"Algeria" : "DZ",
6+
"American Samoa" : "AS",
7+
"Andorra" : "AD",
8+
"Angola" : "AO",
9+
"Anguilla" : "AI",
10+
"Antarctica" : "AQ",
11+
"Antigua and Barbuda" : "AG",
12+
"Argentina" : "AR",
13+
"Armenia" : "AM",
14+
"Aruba" : "AW",
15+
"Australia" : "AU",
16+
"Austria" : "AT",
17+
"Azerbaijan" : "AZ",
18+
" Azerbaijan" : "AZ",
19+
"Bahamas" : "BS",
20+
"The Bahamas" : "BS",
21+
"Bahamas, The" : "BS",
22+
"Bahrain" : "BH",
23+
"Bangladesh" : "BD",
24+
"Barbados" : "BB",
25+
"Belarus" : "BY",
26+
"Belgium" : "BE",
27+
"Belize" : "BZ",
28+
"Benin" : "BJ",
29+
"Bermuda" : "BM",
30+
"Bhutan" : "BT",
31+
"Bolivia, Plurinational State of" : "BO",
32+
"Bolivia" : "BO",
33+
"Bonaire, Sint Eustatius and Saba" : "BQ",
34+
"Caribbean Netherlands" : "BQ",
35+
"Bosnia and Herzegovina" : "BA",
36+
"Bosnia" : "BA",
37+
"Botswana" : "BW",
38+
"Bouvet Island" : "BV",
39+
"Brazil" : "BR",
40+
"British Indian Ocean Territory" : "IO",
41+
"Brunei Darussalam" : "BN",
42+
"Brunei" : "BN",
43+
"Bulgaria" : "BG",
44+
"Burkina Faso" : "BF",
45+
"Burundi" : "BI",
46+
"Cambodia" : "KH",
47+
"Cameroon" : "CM",
48+
"Canada" : "CA",
49+
"Cape Verde" : "CV",
50+
"Cabo Verde" : "CV",
51+
"Cayman Islands" : "KY",
52+
"Central African Republic" : "CF",
53+
"Chad" : "TD",
54+
"Chile" : "CL",
55+
"China" : "CN",
56+
"Mainland China" : "CN",
57+
"Christmas Island" : "CX",
58+
"Cocos (Keeling) Islands" : "CC",
59+
"Colombia" : "CO",
60+
"Comoros" : "KM",
61+
"Congo" : "CG",
62+
"Congo (Brazzaville)" : "CG",
63+
"Republic of the Congo" : "CG",
64+
"Congo, the Democratic Republic of the" : "CD",
65+
"Congo (Kinshasa)" : "CD",
66+
"DR Congo" : "CD",
67+
"Cook Islands" : "CK",
68+
"Costa Rica" : "CR",
69+
"Côte d'Ivoire" : "CI",
70+
"Cote d'Ivoire" : "CI",
71+
"Ivory Coast" : "CI",
72+
"Croatia" : "HR",
73+
"Cuba" : "CU",
74+
"Curaçao" : "CW",
75+
"Curacao" : "CW",
76+
"Cyprus" : "CY",
77+
"Czech Republic" : "CZ",
78+
"Czechia" : "CZ",
79+
"Denmark" : "DK",
80+
"Djibouti" : "DJ",
81+
"Dominica" : "DM",
82+
"Dominican Republic" : "DO",
83+
"Dominican Rep" : "DO",
84+
"Ecuador" : "EC",
85+
"Egypt" : "EG",
86+
"El Salvador" : "SV",
87+
"Equatorial Guinea" : "GQ",
88+
"Eritrea" : "ER",
89+
"Estonia" : "EE",
90+
"Ethiopia" : "ET",
91+
"Falkland Islands (Malvinas)" : "FK",
92+
"Falkland Islands" : "FK",
93+
"Faroe Islands" : "FO",
94+
"Faeroe Islands" : "FO",
95+
"Fiji" : "FJ",
96+
"Finland" : "FI",
97+
"France" : "FR",
98+
"French Guiana" : "GF",
99+
"French Polynesia" : "PF",
100+
"French Southern Territories" : "TF",
101+
"Gabon" : "GA",
102+
"Gambia" : "GM",
103+
"The Gambia" : "GM",
104+
"Gambia, The" : "GM",
105+
"Georgia" : "GE",
106+
"Germany" : "DE",
107+
"Deutschland" : "DE",
108+
"Ghana" : "GH",
109+
"Gibraltar" : "GI",
110+
"Greece" : "GR",
111+
"Greenland" : "GL",
112+
"Grenada" : "GD",
113+
"Guadeloupe" : "GP",
114+
"Guam" : "GU",
115+
"Guatemala" : "GT",
116+
"Guernsey" : "GG",
117+
"Guinea" : "GN",
118+
"Guinea-Bissau" : "GW",
119+
"Guyana" : "GY",
120+
"Haiti" : "HT",
121+
"Heard Island and McDonald Islands" : "HM",
122+
"Holy See (Vatican City State)" : "VA",
123+
"Holy See" : "VA",
124+
"Vatican City" : "VA",
125+
"Honduras" : "HN",
126+
"Hong Kong" : "HK",
127+
"Hong Kong SAR" : "HK",
128+
"Hungary" : "HU",
129+
"Iceland" : "IS",
130+
"India" : "IN",
131+
"Indonesia" : "ID",
132+
"Iran, Islamic Republic of" : "IR",
133+
"Iran" : "IR",
134+
"Iran (Islamic Republic of)" : "IR",
135+
"Iraq" : "IQ",
136+
"Ireland" : "IE",
137+
"Republic of Ireland" : "IE",
138+
"Isle of Man" : "IM",
139+
"Israel" : "IL",
140+
"Italy" : "IT",
141+
"Jamaica" : "JM",
142+
"Japan" : "JP",
143+
"Jersey" : "JE",
144+
"Guernsey and Jersey" : "JE",
145+
"Channel Islands" : "JE",
146+
"Jordan" : "JO",
147+
"Kazakhstan" : "KZ",
148+
"Kenya" : "KE",
149+
"Kiribati" : "KI",
150+
"Korea, Democratic People's Republic of" : "KP",
151+
"North Korea" : "KP",
152+
"Korea, Republic of" : "KR",
153+
"Korea, South" : "KR",
154+
"South Korea" : "KR",
155+
"Republic of Korea" : "KR",
156+
"Kosovo, Republic of" : "XK",
157+
"Kosovo" : "XK",
158+
"Kuwait" : "KW",
159+
"Kyrgyzstan" : "KG",
160+
"Lao People's Democratic Republic" : "LA",
161+
"Laos" : "LA",
162+
"Latvia" : "LV",
163+
"Lebanon" : "LB",
164+
"Lesotho" : "LS",
165+
"Liberia" : "LR",
166+
"Libya" : "LY",
167+
"Liechtenstein" : "LI",
168+
"Lithuania" : "LT",
169+
"Luxembourg" : "LU",
170+
"Macao" : "MO",
171+
"Macau" : "MO",
172+
"Macao SAR" : "MO",
173+
"North Macedonia" : "MK",
174+
"Macedonia" : "MK",
175+
"Madagascar" : "MG",
176+
"Malawi" : "MW",
177+
"Malaysia" : "MY",
178+
"Maldives" : "MV",
179+
"Mali" : "ML",
180+
"Malta" : "MT",
181+
"Marshall Islands" : "MH",
182+
"Martinique" : "MQ",
183+
"Mauritania" : "MR",
184+
"Mauritius" : "MU",
185+
"Mayotte" : "YT",
186+
"Mexico" : "MX",
187+
"Micronesia, Federated States of" : "FM",
188+
"F.S. Micronesia" : "FM",
189+
"Micronesia" : "FM",
190+
"Moldova, Republic of" : "MD",
191+
"Republic of Moldova" : "MD",
192+
"Moldova" : "MD",
193+
"Monaco" : "MC",
194+
"Mongolia" : "MN",
195+
"Montenegro" : "ME",
196+
"Montserrat" : "MS",
197+
"Morocco" : "MA",
198+
"Mozambique" : "MZ",
199+
"Myanmar" : "MM",
200+
"Burma" : "MM",
201+
"Namibia" : "NA",
202+
"Nauru" : "NR",
203+
"Nepal" : "NP",
204+
"Netherlands" : "NL",
205+
"New Caledonia" : "NC",
206+
"New Zealand" : "NZ",
207+
"Nicaragua" : "NI",
208+
"Niger" : "NE",
209+
"Nigeria" : "NG",
210+
"Niue" : "NU",
211+
"Norfolk Island" : "NF",
212+
"Northern Mariana Islands" : "MP",
213+
"Norway" : "NO",
214+
"Oman" : "OM",
215+
"Pakistan" : "PK",
216+
"Palau" : "PW",
217+
"Palestine, State of" : "PS",
218+
"Palestine" : "PS",
219+
"occupied Palestinian territory" : "PS",
220+
"State of Palestine" : "PS",
221+
"The West Bank and Gaza" : "PS",
222+
"West Bank and Gaza" : "PS",
223+
"Panama" : "PA",
224+
"Papua New Guinea" : "PG",
225+
"Paraguay" : "PY",
226+
"Peru" : "PE",
227+
"Philippines" : "PH",
228+
"Pitcairn" : "PN",
229+
"Poland" : "PL",
230+
"Portugal" : "PT",
231+
"Puerto Rico" : "PR",
232+
"Qatar" : "QA",
233+
"Réunion" : "RE",
234+
"Reunion" : "RE",
235+
"Romania" : "RO",
236+
"Russian Federation" : "RU",
237+
"Russia" : "RU",
238+
"Rwanda" : "RW",
239+
"Saint Barthélemy" : "BL",
240+
"Saint Barthelemy" : "BL",
241+
"Saint Helena, Ascension and Tristan da Cunha" : "SH",
242+
"Saint Helena" : "SH",
243+
"Saint Kitts and Nevis" : "KN",
244+
"Saint Kitts & Nevis" : "KN",
245+
"Saint Lucia" : "LC",
246+
"Saint Martin (French part)" : "MF",
247+
"Saint Martin" : "MF",
248+
"St. Martin" : "MF",
249+
"Saint Pierre and Miquelon" : "PM",
250+
"Saint Pierre & Miquelon" : "PM",
251+
"Saint Vincent and the Grenadines" : "VC",
252+
"St. Vincent & Grenadines" : "VC",
253+
"Samoa" : "WS",
254+
"San Marino" : "SM",
255+
"Sao Tome and Principe" : "ST",
256+
"São Tomé and Príncipe" : "ST",
257+
"Sao Tome & Principe" : "ST",
258+
"Saudi Arabia" : "SA",
259+
"Senegal" : "SN",
260+
"Serbia" : "RS",
261+
"Seychelles" : "SC",
262+
"Sierra Leone" : "SL",
263+
"Singapore" : "SG",
264+
"Sint Maarten (Dutch part)" : "SX",
265+
"Sint Maarten" : "SX",
266+
"Slovakia" : "SK",
267+
"Slovenia" : "SI",
268+
"Solomon Islands" : "SB",
269+
"Somalia" : "SO",
270+
"South Africa" : "ZA",
271+
"South Georgia and the South Sandwich Islands" : "GS",
272+
"South Sudan" : "SS",
273+
"Spain" : "ES",
274+
"Sri Lanka" : "LK",
275+
"Sudan" : "SD",
276+
"Suriname" : "SR",
277+
"Svalbard and Jan Mayen" : "SJ",
278+
"Eswatini" : "SZ",
279+
"Swaziland" : "SZ",
280+
"Sweden" : "SE",
281+
"Switzerland" : "CH",
282+
"Syrian Arab Republic" : "SY",
283+
"Syria" : "SY",
284+
"Taiwan, Province of China" : "TW",
285+
"Taiwan*" : "TW",
286+
"Taipei and environs" : "TW",
287+
"Taiwan" : "TW",
288+
"Tajikistan" : "TJ",
289+
"Tanzania, United Republic of" : "TZ",
290+
"Tanzania" : "TZ",
291+
"Thailand" : "TH",
292+
"Timor-Leste" : "TL",
293+
"East Timor" : "TL",
294+
"Togo" : "TG",
295+
"Tokelau" : "TK",
296+
"Tonga" : "TO",
297+
"Trinidad and Tobago" : "TT",
298+
"Tunisia" : "TN",
299+
"Turkey" : "TR",
300+
"Turkmenistan" : "TM",
301+
"Turks and Caicos Islands" : "TC",
302+
"Turks and Caicos" : "TC",
303+
"Tuvalu" : "TV",
304+
"Uganda" : "UG",
305+
"Ukraine" : "UA",
306+
"United Arab Emirates" : "AE",
307+
"Emirates" : "AE",
308+
"United Kingdom" : "GB",
309+
"UK" : "GB",
310+
311+
"North Ireland" : "GB",
312+
"United States" : "US",
313+
"US" : "US",
314+
"United States Minor Outlying Islands" : "UM",
315+
"Uruguay" : "UY",
316+
"Uzbekistan" : "UZ",
317+
"Vanuatu" : "VU",
318+
"Venezuela, Bolivarian Republic of" : "VE",
319+
"Venezuela" : "VE",
320+
"Viet Nam" : "VN",
321+
"Vietnam" : "VN",
322+
"Virgin Islands, British" : "VG",
323+
"British Virgin Islands" : "VG",
324+
"Virgin Islands, U.S." : "VI",
325+
"U.S. Virgin Islands" : "VI",
326+
"Wallis and Futuna" : "WF",
327+
"Wallis & Futuna" : "WF",
328+
"Western Sahara" : "EH",
329+
"Yemen" : "YE",
330+
"Zambia" : "ZM",
331+
"Zimbabwe" : "ZW",
332+
333+
"United Nations Neutral Zone" : "XD",
334+
"Iraq-Saudi Arabia Neutral Zone" : "XE",
335+
"Spratly Islands" : "XS"
336+
}

app/utils/countries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ def get_country_code(self,country_name):
2828
return code
2929

3030
def add_country_code(self,country_name,country_code):
31-
self.COUNTRY_NAME__COUNTRY_CODE[country_name] = country_code
31+
self.COUNTRY_NAME__COUNTRY_CODE[country_name] = country_code

0 commit comments

Comments
 (0)