Commit a2172e2e authored by Florent Chehab's avatar Florent Chehab
Browse files

Country update

parent cd62298f
Pipeline #22029 passed with stage
in 1 minute and 15 seconds
......@@ -2,8 +2,9 @@ from django.contrib import admin
from reversion_compare.admin import CompareVersionAdmin
from rex.models.university import University
from rex.models.country import Country
from rex.models.country import Country, Region
admin.site.register(University, CompareVersionAdmin)
admin.site.register(Country)
admin.site.register(Region)
"ISO 3166-1 alpha-2","Pays"
"AF","Afghanistan"
"AL","Albanie"
"AQ","Antarctique"
"DZ","Algérie"
"AS","Samoa Américaines"
"AD","Andorre"
"AO","Angola"
"AG","Antigua-et-Barbuda"
"AZ","Azerbaïdjan"
"AR","Argentine"
"AU","Australie"
"AT","Autriche"
"BS","Bahamas"
"BH","Bahreïn"
"BD","Bangladesh"
"AM","Arménie"
"BB","Barbade"
"BE","Belgique"
"BM","Bermudes"
"BT","Bhoutan"
"BO","Bolivie"
"BA","Bosnie-Herzégovine"
"BW","Botswana"
"BV","Île Bouvet"
"BR","Brésil"
"BZ","Belize"
"IO","Territoire Britannique de l'Océan Indien"
"SB","Îles Salomon"
"VG","Îles Vierges Britanniques"
"BN","Brunéi Darussalam"
"BG","Bulgarie"
"MM","Myanmar"
"BI","Burundi"
"BY","Bélarus"
"KH","Cambodge"
"CM","Cameroun"
"CA","Canada"
"CV","Cap-vert"
"KY","Îles Caïmanes"
"CF","République Centrafricaine"
"LK","Sri Lanka"
"TD","Tchad"
"CL","Chili"
"CN","Chine"
"TW","Taïwan"
"CX","Île Christmas"
"CC","Îles Cocos (Keeling)"
"CO","Colombie"
"KM","Comores"
"YT","Mayotte"
"CG","République du Congo"
"CD","République Démocratique du Congo"
"CK","Îles Cook"
"CR","Costa Rica"
"HR","Croatie"
"CU","Cuba"
"CY","Chypre"
"CZ","République Tchèque"
"BJ","Bénin"
"DK","Danemark"
"DM","Dominique"
"DO","République Dominicaine"
"EC","Équateur"
"SV","El Salvador"
"GQ","Guinée Équatoriale"
"ET","Éthiopie"
"ER","Érythrée"
"EE","Estonie"
"FO","Îles Féroé"
"FK","Îles (malvinas) Falkland"
"GS","Géorgie du Sud et les Îles Sandwich du Sud"
"FJ","Fidji"
"FI","Finlande"
"AX","Îles Åland"
"FR","France"
"GF","Guyane Française"
"PF","Polynésie Française"
"TF","Terres Australes Françaises"
"DJ","Djibouti"
"GA","Gabon"
"GE","Géorgie"
"GM","Gambie"
"PS","Territoire Palestinien Occupé"
"DE","Allemagne"
"GH","Ghana"
"GI","Gibraltar"
"KI","Kiribati"
"GR","Grèce"
"GL","Groenland"
"GD","Grenade"
"GP","Guadeloupe"
"GU","Guam"
"GT","Guatemala"
"GN","Guinée"
"GY","Guyana"
"HT","Haïti"
"HM","Îles Heard et Mcdonald"
"VA","Saint-Siège (état de la Cité du Vatican)"
"HN","Honduras"
"HK","Hong-Kong"
"HU","Hongrie"
"IS","Islande"
"IN","Inde"
"ID","Indonésie"
"IR","République Islamique d'Iran"
"IQ","Iraq"
"IE","Irlande"
"IL","Israël"
"IT","Italie"
"CI","Côte d'Ivoire"
"JM","Jamaïque"
"JP","Japon"
"KZ","Kazakhstan"
"JO","Jordanie"
"KE","Kenya"
"KP","République Populaire Démocratique de Corée"
"KR","République de Corée"
"KW","Koweït"
"KG","Kirghizistan"
"LA","République Démocratique Populaire Lao"
"LB","Liban"
"LS","Lesotho"
"LV","Lettonie"
"LR","Libéria"
"LY","Jamahiriya Arabe Libyenne"
"LI","Liechtenstein"
"LT","Lituanie"
"LU","Luxembourg"
"MO","Macao"
"MG","Madagascar"
"MW","Malawi"
"MY","Malaisie"
"MV","Maldives"
"ML","Mali"
"MT","Malte"
"MQ","Martinique"
"MR","Mauritanie"
"MU","Maurice"
"MX","Mexique"
"MC","Monaco"
"MN","Mongolie"
"MD","République de Moldova"
"MS","Montserrat"
"MA","Maroc"
"MZ","Mozambique"
"OM","Oman"
"NA","Namibie"
"NR","Nauru"
"NP","Népal"
"NL","Pays-Bas"
"AN","Antilles Néerlandaises"
"AW","Aruba"
"NC","Nouvelle-Calédonie"
"VU","Vanuatu"
"NZ","Nouvelle-Zélande"
"NI","Nicaragua"
"NE","Niger"
"NG","Nigéria"
"NU","Niué"
"NF","Île Norfolk"
"NO","Norvège"
"MP","Îles Mariannes du Nord"
"UM","Îles Mineures Éloignées des États-Unis"
"FM","États Fédérés de Micronésie"
"MH","Îles Marshall"
"PW","Palaos"
"PK","Pakistan"
"PA","Panama"
"PG","Papouasie-Nouvelle-Guinée"
"PY","Paraguay"
"PE","Pérou"
"PH","Philippines"
"PN","Pitcairn"
"PL","Pologne"
"PT","Portugal"
"GW","Guinée-Bissau"
"TL","Timor-Leste"
"PR","Porto Rico"
"QA","Qatar"
"RE","Réunion"
"RO","Roumanie"
"RU","Fédération de Russie"
"RW","Rwanda"
"SH","Sainte-Hélène"
"KN","Saint-Kitts-et-Nevis"
"AI","Anguilla"
"LC","Sainte-Lucie"
"PM","Saint-Pierre-et-Miquelon"
"VC","Saint-Vincent-et-les Grenadines"
"SM","Saint-Marin"
"ST","Sao Tomé-et-Principe"
"SA","Arabie Saoudite"
"SN","Sénégal"
"SC","Seychelles"
"SL","Sierra Leone"
"SG","Singapour"
"SK","Slovaquie"
"VN","Viet Nam"
"SI","Slovénie"
"SO","Somalie"
"ZA","Afrique du Sud"
"ZW","Zimbabwe"
"ES","Espagne"
"EH","Sahara Occidental"
"SD","Soudan"
"SR","Suriname"
"SJ","Svalbard etÎle Jan Mayen"
"SZ","Swaziland"
"SE","Suède"
"CH","Suisse"
"SY","République Arabe Syrienne"
"TJ","Tadjikistan"
"TH","Thaïlande"
"TG","Togo"
"TK","Tokelau"
"TO","Tonga"
"TT","Trinité-et-Tobago"
"AE","Émirats Arabes Unis"
"TN","Tunisie"
"TR","Turquie"
"TM","Turkménistan"
"TC","Îles Turks et Caïques"
"TV","Tuvalu"
"UG","Ouganda"
"UA","Ukraine"
"MK","L'ex-République Yougoslave de Macédoine"
"EG","Égypte"
"GB","Royaume-Uni"
"IM","Île de Man"
"TZ","République-Unie de Tanzanie"
"US","États-Unis"
"VI","Îles Vierges des États-Unis"
"BF","Burkina Faso"
"UY","Uruguay"
"UZ","Ouzbékistan"
"VE","Venezuela"
"WF","Wallis et Futuna"
"WS","Samoa"
"YE","Yémen"
"CS","Serbie-et-Monténégro"
"ZM","Zambie"
"Global Code","Global Name","Region Code","Region Name","Sub-region Code","Sub-region Name","Intermediate Region Code","Intermediate Region Name","Country or Area","M49 Code","ISO-alpha3 Code","Least Developed Countries (LDC)","Land Locked Developing Countries (LLDC)","Small Island Developing States (SIDS)","Developed / Developing Countries"
"001","Monde","002","Afrique","015","Afrique septentrionale","","","Algérie","012","DZA","","","","Developing"
"001","Monde","002","Afrique","015","Afrique septentrionale","","","Égypte","818","EGY","","","","Developing"
"001","Monde","002","Afrique","015","Afrique septentrionale","","","Libye","434","LBY","","","","Developing"
"001","Monde","002","Afrique","015","Afrique septentrionale","","","Maroc","504","MAR","","","","Developing"
"001","Monde","002","Afrique","015","Afrique septentrionale","","","Soudan","729","SDN","x","","","Developing"
"001","Monde","002","Afrique","015","Afrique septentrionale","","","Tunisie","788","TUN","","","","Developing"
"001","Monde","002","Afrique","015","Afrique septentrionale","","","Sahara occidental","732","ESH","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Territoire britannique de l'océan Indien","086","IOT","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Burundi","108","BDI","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Comores","174","COM","x","","x","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Djibouti","262","DJI","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Érythrée","232","ERI","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Éthiopie","231","ETH","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Terres australes françaises","260","ATF","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Kenya","404","KEN","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Madagascar","450","MDG","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Malawi","454","MWI","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Maurice","480","MUS","","","x","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Mayotte","175","MYT","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Mozambique","508","MOZ","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Réunion","638","REU","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Rwanda","646","RWA","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Seychelles","690","SYC","","","x","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Somalie","706","SOM","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Soudan du Sud","728","SSD","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Ouganda","800","UGA","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","République-Unie de Tanzanie","834","TZA","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Zambie","894","ZMB","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","014","Afrique orientale","Zimbabwe","716","ZWE","","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","017","Afrique centrale","Angola","024","AGO","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","017","Afrique centrale","Cameroun","120","CMR","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","017","Afrique centrale","République centrafricaine","140","CAF","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","017","Afrique centrale","Tchad","148","TCD","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","017","Afrique centrale","Congo","178","COG","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","017","Afrique centrale","République démocratique du Congo","180","COD","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","017","Afrique centrale","Guinée équatoriale","226","GNQ","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","017","Afrique centrale","Gabon","266","GAB","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","017","Afrique centrale","Sao Tomé-et-Principe","678","STP","x","","x","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","018","Afrique australe","Botswana","072","BWA","","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","018","Afrique australe","Lesotho","426","LSO","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","018","Afrique australe","Namibie","516","NAM","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","018","Afrique australe","Afrique du Sud","710","ZAF","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","018","Afrique australe","Swaziland","748","SWZ","","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Bénin","204","BEN","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Burkina Faso","854","BFA","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Cabo Verde","132","CPV","","","x","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Côte d'Ivoire","384","CIV","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Gambie","270","GMB","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Ghana","288","GHA","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Guinée","324","GIN","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Guinée-Bissau","624","GNB","x","","x","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Libéria","430","LBR","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Mali","466","MLI","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Mauritanie","478","MRT","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Niger","562","NER","x","x","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Nigéria","566","NGA","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Sainte-Hélène","654","SHN","","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Sénégal","686","SEN","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Sierra Leone","694","SLE","x","","","Developing"
"001","Monde","002","Afrique","202","Afrique subsaharienne","011","Afrique occidentale","Togo","768","TGO","x","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Anguilla","660","AIA","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Antigua-et-Barbuda","028","ATG","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Aruba","533","ABW","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Bahamas","044","BHS","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Barbade","052","BRB","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Bonaire, Saint-Eustache et Saba","535","BES","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Îles Vierges britanniques","092","VGB","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Îles Caïmanes","136","CYM","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Cuba","192","CUB","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Curaçao","531","CUW","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Dominique","212","DMA","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","République dominicaine","214","DOM","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Grenade","308","GRD","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Guadeloupe","312","GLP","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Haïti","332","HTI","x","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Jamaïque","388","JAM","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Martinique","474","MTQ","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Montserrat","500","MSR","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Porto Rico","630","PRI","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Saint-Barthélemy","652","BLM","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Saint-Kitts-et-Nevis","659","KNA","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Sainte-Lucie","662","LCA","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Saint-Martin (partie française)","663","MAF","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Saint-Vincent-et-les Grenadines","670","VCT","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Saint-Martin (partie néerlandaise)","534","SXM","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Trinité-et-Tobago","780","TTO","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Îles Turques-et-Caïques","796","TCA","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","029","Caraïbes","Îles Vierges américaines","850","VIR","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","013","Amérique centrale","Belize","084","BLZ","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","013","Amérique centrale","Costa Rica","188","CRI","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","013","Amérique centrale","El Salvador","222","SLV","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","013","Amérique centrale","Guatemala","320","GTM","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","013","Amérique centrale","Honduras","340","HND","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","013","Amérique centrale","Mexique","484","MEX","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","013","Amérique centrale","Nicaragua","558","NIC","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","013","Amérique centrale","Panama","591","PAN","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Argentine","032","ARG","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Bolivie (État plurinational de)","068","BOL","","x","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Île Bouvet","074","BVT","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Brésil","076","BRA","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Chili","152","CHL","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Colombie","170","COL","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Équateur","218","ECU","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Îles Falkland (Malvinas)","238","FLK","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Guyane française","254","GUF","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Guyana","328","GUY","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Paraguay","600","PRY","","x","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Pérou","604","PER","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Géorgie du Sud-et-les Îles Sandwich du Sud","239","SGS","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Suriname","740","SUR","","","x","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Uruguay","858","URY","","","","Developing"
"001","Monde","019","Amériques","419","Amérique latine et Caraïbes","005","Amérique du Sud","Venezuela (République bolivarienne du)","862","VEN","","","","Developing"
"001","Monde","019","Amériques","021","Amérique septentrionale","","","Bermudes","060","BMU","","","","Developed"
"001","Monde","019","Amériques","021","Amérique septentrionale","","","Canada","124","CAN","","","","Developed"
"001","Monde","019","Amériques","021","Amérique septentrionale","","","Groenland","304","GRL","","","","Developed"
"001","Monde","019","Amériques","021","Amérique septentrionale","","","Saint-Pierre-et-Miquelon","666","SPM","","","","Developed"
"001","Monde","019","Amériques","021","Amérique septentrionale","","","États-Unis d'Amérique","840","USA","","","","Developed"
"001","Monde","","","","","","","Antarctique","010","ATA","","","",""
"001","Monde","142","Asie","143","Asie centrale","","","Kazakhstan","398","KAZ","","x","","Developing"
"001","Monde","142","Asie","143","Asie centrale","","","Kirghizistan","417","KGZ","","x","","Developing"
"001","Monde","142","Asie","143","Asie centrale","","","Tadjikistan","762","TJK","","x","","Developing"
"001","Monde","142","Asie","143","Asie centrale","","","Turkménistan","795","TKM","","x","","Developing"
"001","Monde","142","Asie","143","Asie centrale","","","Ouzbékistan","860","UZB","","x","","Developing"
"001","Monde","142","Asie","030","Asie orientale","","","Chine","156","CHN","","","","Developing"
"001","Monde","142","Asie","030","Asie orientale","","","Chine, région administrative spéciale de Hong Kong","344","HKG","","","","Developing"
"001","Monde","142","Asie","030","Asie orientale","","","Chine, région administrative spéciale de Macao","446","MAC","","","","Developing"
"001","Monde","142","Asie","030","Asie orientale","","","République populaire démocratique de Corée","408","PRK","","","","Developing"
"001","Monde","142","Asie","030","Asie orientale","","","Japon","392","JPN","","","","Developed"
"001","Monde","142","Asie","030","Asie orientale","","","Mongolie","496","MNG","","x","","Developing"
"001","Monde","142","Asie","030","Asie orientale","","","République de Corée","410","KOR","","","","Developing"
"001","Monde","142","Asie","035","Asie du Sud-Est","","","Brunéi Darussalam","096","BRN","","","","Developing"
"001","Monde","142","Asie","035","Asie du Sud-Est","","","Cambodge","116","KHM","x","","","Developing"
"001","Monde","142","Asie","035","Asie du Sud-Est","","","Indonésie","360","IDN","","","","Developing"
"001","Monde","142","Asie","035","Asie du Sud-Est","","","République démocratique populaire lao","418","LAO","x","x","","Developing"
"001","Monde","142","Asie","035","Asie du Sud-Est","","","Malaisie","458","MYS","","","","Developing"
"001","Monde","142","Asie","035","Asie du Sud-Est","","","Myanmar","104","MMR","x","","","Developing"
"001","Monde","142","Asie","035","Asie du Sud-Est","","","Philippines","608","PHL","","","","Developing"
"001","Monde","142","Asie","035","Asie du Sud-Est","","","Singapour","702","SGP","","","x","Developing"
"001","Monde","142","Asie","035","Asie du Sud-Est","","","Thaïlande","764","THA","","","","Developing"
"001","Monde","142","Asie","035","Asie du Sud-Est","","","Timor-Leste","626","TLS","x","","x","Developing"
"001","Monde","142","Asie","035","Asie du Sud-Est","","","Viet Nam","704","VNM","","","","Developing"
"001","Monde","142","Asie","034","Asie méridionale","","","Afghanistan","004","AFG","x","x","","Developing"
"001","Monde","142","Asie","034","Asie méridionale","","","Bangladesh","050","BGD","x","","","Developing"
"001","Monde","142","Asie","034","Asie méridionale","","","Bhoutan","064","BTN","x","x","","Developing"
"001","Monde","142","Asie","034","Asie méridionale","","","Inde","356","IND","","","","Developing"
"001","Monde","142","Asie","034","Asie méridionale","","","Iran (République islamique d')","364","IRN","","","","Developing"
"001","Monde","142","Asie","034","Asie méridionale","","","Maldives","462","MDV","","","x","Developing"
"001","Monde","142","Asie","034","Asie méridionale","","","Népal","524","NPL","x","x","","Developing"
"001","Monde","142","Asie","034","Asie méridionale","","","Pakistan","586","PAK","","","","Developing"
"001","Monde","142","Asie","034","Asie méridionale","","","Sri Lanka","144","LKA","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Arménie","051","ARM","","x","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Azerbaïdjan","031","AZE","","x","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Bahreïn","048","BHR","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Chypre","196","CYP","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Géorgie","268","GEO","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Iraq","368","IRQ","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Israël","376","ISR","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Jordanie","400","JOR","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Koweït","414","KWT","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Liban","422","LBN","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Oman","512","OMN","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Qatar","634","QAT","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Arabie saoudite","682","SAU","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","État de Palestine","275","PSE","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","République arabe syrienne","760","SYR","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Turquie","792","TUR","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Émirats arabes unis","784","ARE","","","","Developing"
"001","Monde","142","Asie","145","Asie occidentale","","","Yémen","887","YEM","x","","","Developing"
"001","Monde","150","Europe","151","Europe orientale","","","Bélarus","112","BLR","","","","Developed"
"001","Monde","150","Europe","151","Europe orientale","","","Bulgarie","100","BGR","","","","Developed"
"001","Monde","150","Europe","151","Europe orientale","","","Tchéquie","203","CZE","","","","Developed"
"001","Monde","150","Europe","151","Europe orientale","","","Hongrie","348","HUN","","","","Developed"
"001","Monde","150","Europe","151","Europe orientale","","","Pologne","616","POL","","","","Developed"
"001","Monde","150","Europe","151","Europe orientale","","","République de Moldova","498","MDA","","x","","Developed"
"001","Monde","150","Europe","151","Europe orientale","","","Roumanie","642","ROU","","","","Developed"
"001","Monde","150","Europe","151","Europe orientale","","","Fédération de Russie","643","RUS","","","","Developed"
"001","Monde","150","Europe","151","Europe orientale","","","Slovaquie","703","SVK","","","","Developed"
"001","Monde","150","Europe","151","Europe orientale","","","Ukraine","804","UKR","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Îles d'Åland","248","ALA","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","830","Îles Anglo-Normandes","Guernesey","831","GGY","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","830","Îles Anglo-Normandes","Jersey","832","JEY","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","830","Îles Anglo-Normandes","Sercq","680","","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Danemark","208","DNK","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Estonie","233","EST","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Îles Féroé","234","FRO","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Finlande","246","FIN","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Islande","352","ISL","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Irlande","372","IRL","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Île de Man","833","IMN","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Lettonie","428","LVA","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Lituanie","440","LTU","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Norvège","578","NOR","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Îles Svalbard-et-Jan Mayen","744","SJM","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Suède","752","SWE","","","","Developed"
"001","Monde","150","Europe","154","Europe septentrionale","","","Royaume-Uni de Grande-Bretagne et d'Irlande du Nord","826","GBR","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Albanie","008","ALB","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Andorre","020","AND","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Bosnie-Herzégovine","070","BIH","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Croatie","191","HRV","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Gibraltar","292","GIB","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Grèce","300","GRC","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Saint-Siège","336","VAT","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Italie","380","ITA","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Malte","470","MLT","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Monténégro","499","MNE","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Portugal","620","PRT","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Saint-Marin","674","SMR","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Serbie","688","SRB","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Slovénie","705","SVN","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","Espagne","724","ESP","","","","Developed"
"001","Monde","150","Europe","039","Europe méridionale","","","ex-République yougoslave de Macédoine","807","MKD","","x","","Developed"
"001","Monde","150","Europe","155","Europe occidentale","","","Autriche","040","AUT","","","","Developed"
"001","Monde","150","Europe","155","Europe occidentale","","","Belgique","056","BEL","","","","Developed"
"001","Monde","150","Europe","155","Europe occidentale","","","France","250","FRA","","","","Developed"
"001","Monde","150","Europe","155","Europe occidentale","","","Allemagne","276","DEU","","","","Developed"
"001","Monde","150","Europe","155","Europe occidentale","","","Liechtenstein","438","LIE","","","","Developed"
"001","Monde","150","Europe","155","Europe occidentale","","","Luxembourg","442","LUX","","","","Developed"
"001","Monde","150","Europe","155","Europe occidentale","","","Monaco","492","MCO","","","","Developed"
"001","Monde","150","Europe","155","Europe occidentale","","","Pays-Bas","528","NLD","","","","Developed"
"001","Monde","150","Europe","155","Europe occidentale","","","Suisse","756","CHE","","","","Developed"
"001","Monde","009","Océanie","053","Australie et Nouvelle-Zélande","","","Australie","036","AUS","","","","Developed"
"001","Monde","009","Océanie","053","Australie et Nouvelle-Zélande","","","Île Christmas","162","CXR","","","","Developed"
"001","Monde","009","Océanie","053","Australie et Nouvelle-Zélande","","","Îles des Cocos (Keeling)","166","CCK","","","","Developed"
"001","Monde","009","Océanie","053","Australie et Nouvelle-Zélande","","","Île Heard-et-Îles MacDonald","334","HMD","","","","Developed"
"001","Monde","009","Océanie","053","Australie et Nouvelle-Zélande","","","Nouvelle-Zélande","554","NZL","","","","Developed"
"001","Monde","009","Océanie","053","Australie et Nouvelle-Zélande","","","Île Norfolk","574","NFK","","","","Developed"
"001","Monde","009","Océanie","054","Mélanésie","","","Fidji","242","FJI","","","x","Developing"
"001","Monde","009","Océanie","054","Mélanésie","","","Nouvelle-Calédonie","540","NCL","","","x","Developing"
"001","Monde","009","Océanie","054","Mélanésie","","","Papouasie-Nouvelle-Guinée","598","PNG","","","x","Developing"
"001","Monde","009","Océanie","054","Mélanésie","","","Îles Salomon","090","SLB","x","","x","Developing"
"001","Monde","009","Océanie","054","Mélanésie","","","Vanuatu","548","VUT","x","","x","Developing"
"001","Monde","009","Océanie","057","Micronésie","","","Guam","316","GUM","","","x","Developing"
"001","Monde","009","Océanie","057","Micronésie","","","Kiribati","296","KIR","x","","x","Developing"
"001","Monde","009","Océanie","057","Micronésie","","","Îles Marshall","584","MHL","","","x","Developing"
"001","Monde","009","Océanie","057","Micronésie","","","Micronésie (États fédérés de)","583","FSM","","","x","Developing"
"001","Monde","009","Océanie","057","Micronésie","","","Nauru","520","NRU","","","x","Developing"
"001","Monde","009","Océanie","057","Micronésie","","","Îles Mariannes du Nord","580","MNP","","","x","Developing"
"001","Monde","009","Océanie","057","Micronésie","","","Palaos","585","PLW","","","x","Developing"
"001","Monde","009","Océanie","057","Micronésie","","","Îles mineures éloignées des États-Unis","581","UMI","","","","Developing"
"001","Monde","009","Océanie","061","Polynésie","","","Samoa américaines","016","ASM","","","x","Developing"
"001","Monde","009","Océanie","061","Polynésie","","","Îles Cook","184","COK","","","x","Developing"
"001","Monde","009","Océanie","061","Polynésie","","","Polynésie française","258","PYF","","","x","Developing"
"001","Monde","009","Océanie","061","Polynésie","","","Nioué","570","NIU","","","x","Developing"
"001","Monde","009","Océanie","061","Polynésie","","","Pitcairn","612","PCN","","","","Developing"
"001","Monde","009","Océanie","061","Polynésie","","","Samoa","882","WSM","","","x","Developing"
"001","Monde","009","Océanie","061","Polynésie","","","Tokélaou","772","TKL","","","","Developing"
"001","Monde","009","Océanie","061","Polynésie","","","Tonga","776","TON","","","x","Developing"
"001","Monde","009","Océanie","061","Polynésie","","","Tuvalu","798","TUV","x","","x","Developing"
"001","Monde","009","Océanie","061","Polynésie","","","Îles Wallis-et-Futuna","876","WLF","","","","Developing"
\ No newline at end of file
# Generated by Django 2.0.3 on 2018-04-24 19:19
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('rex', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Region',
fields=[
('name', models.CharField(max_length=200)),
('un_code', models.CharField(max_length=3, primary_key=True, serialize=False)),
('parent', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='rex.Region')),
],
),
migrations.RemoveField(
model_name='country',
name='iso_code',
),
migrations.AddField(
model_name='country',
name='iso_alpha3_code',
field=models.CharField(default='TMP', max_length=3, primary_key=True, serialize=False),
preserve_default=False,
),
migrations.AddField(
model_name='country',
name='region',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='rex.Region'),
),
]
from .country import Country, CountryViewSet, CountrySerializer # noqa: F401
from .country import Country, CountrySerializer, CountryViewSet # noqa: F401
from .country import Region, RegionSerializer, RegionViewSet # noqa: F401
from django.db import models
from rest_framework import serializers, viewsets, permissions
# Data model based on : https://unstats.un.org/unsd/methodology/m49/overview/
class Region(models.Model):
name = models.CharField(max_length=200)
un_code = models.CharField(primary_key=True, max_length=3)
parent = models.ForeignKey(
'self', on_delete=models.SET_NULL, null=True)
class Country(models.Model):
name = models.CharField(max_length=200)
iso_code = models.CharField(primary_key=True, max_length=2)
iso_alpha3_code = models.CharField(primary_key=True, max_length=3)
region = models.ForeignKey(Region, on_delete=models.PROTECT, null=True)
"""
API RELATED STUFF BELLOW
"""
class CountrySerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Country
fields = ('name', 'iso_code', 'url')
fields = ('name', 'iso_alpha3_code', 'region', 'url')
class CountryViewSet(viewsets.ModelViewSet):
......@@ -27,3 +42,25 @@ class CountryViewSet(viewsets.ModelViewSet):
permission_classes = (permissions.DjangoModelPermissions,)
queryset = Country.objects.all() # noqa: E1101
serializer_class = CountrySerializer
class RegionSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Region
fields = ('name', 'un_code', 'parent', 'url')
class RegionViewSet(viewsets.ModelViewSet):
"""
retrieve:
Retourne un pays.
list:
Retourne une liste de pays.
create:
Créée un nouveau pays.
"""
permission_classes = (permissions.DjangoModelPermissions,)
queryset = Region.objects.all() # noqa: E1101
serializer_class = RegionSerializer
from django.conf.urls import url, include
from rex import views
from rest_framework import routers
from rex.models.country import CountryViewSet
from rex.models.country import CountryViewSet, RegionViewSet
from rest_framework.documentation import include_docs_urls
......@@ -13,5 +13,6 @@ urlpatterns = [
router = routers.DefaultRouter()
router.register(r'country', CountryViewSet)
router.register(r'region', RegionViewSet)
urlpatterns += [url(r'^api/', include(router.urls))]
......@@ -5,22 +5,48 @@ Script to insert the country data in the database