app/soc/models/countries.py
changeset 2248 094785ac13a5
parent 1308 35b75ffcbb37
child 2735 74f0972f523f
equal deleted inserted replaced
2247:64968b86b07c 2248:094785ac13a5
    22 
    22 
    23   Cuba, Iran, Myanmar (formerly Burma), North Korea, Sudan, Syria
    23   Cuba, Iran, Myanmar (formerly Burma), North Korea, Sudan, Syria
    24 """
    24 """
    25 
    25 
    26 __authors__ = [
    26 __authors__ = [
       
    27   '"Madhusudan.C.S" <madhusudancs@gmail.com>',
    27   '"Todd Larsen" <tlarsen@google.com>',
    28   '"Todd Larsen" <tlarsen@google.com>',
    28 ]
    29 ]
    29 
    30 
    30 
    31 
    31 COUNTRIES_AND_TERRITORIES = (
    32 COUNTRIES_AND_TERRITORIES = (
   261   'Western Sahara',
   262   'Western Sahara',
   262   'Yemen',
   263   'Yemen',
   263   'Zambia',
   264   'Zambia',
   264   'Zimbabwe',
   265   'Zimbabwe',
   265 )
   266 )
       
   267 
       
   268 # mapping of countries to their CCTLD
       
   269 COUNTRIES_TO_CCTLD = {
       
   270   'Afghanistan, Islamic State of': '.af',
       
   271   'Albania': '.al',
       
   272   'Algeria': '.dz',
       
   273   'American Samoa': '.as',
       
   274   'Andorra, Principality of': '.ad',
       
   275   'Angola': '.ao',
       
   276   'Anguilla': '.ai',
       
   277   'Antarctica': '.aq',
       
   278   'Antigua and Barbuda': '.ag',
       
   279   'Argentina': '.ar',
       
   280   'Armenia': '.am',
       
   281   'Aruba': '.aw',
       
   282   'Australia': '.au',
       
   283   'Austria': '.at',
       
   284   'Azerbaidjan': '.az',
       
   285   'Bahamas': '.bs',
       
   286   'Bahrain': '.bh',
       
   287   'Bangladesh': '.bd',
       
   288   'Barbados': '.bb',
       
   289   'Belarus': '.by',
       
   290   'Belgium': '.be',
       
   291   'Belize': '.bz',
       
   292   'Benin': '.bj',
       
   293   'Bermuda': '.bm',
       
   294   'Bhutan': '.bt',
       
   295   'Bolivia': '.bo',
       
   296   'Bosnia-Herzegovina': '.ba',
       
   297   'Botswana': '.bw',
       
   298   'Bouvet Island': '.bv',
       
   299   'Brazil': '.br',
       
   300   'British Indian Ocean Territory': '.io',
       
   301   'Brunei Darussalam': '.bn',
       
   302   'Bulgaria': '',
       
   303   'Burkina Faso': '.bg',
       
   304   'Burundi': '.bi',
       
   305   'Cambodia, Kingdom of': '.kh',
       
   306   'Cameroon': '.cm',
       
   307   'Canada': '.ca',
       
   308   'Cape Verde': '.cv',
       
   309   'Cayman Islands': '.ky',
       
   310   'Central African Republic': '.cf',
       
   311   'Chad': '.td',
       
   312   'Chile': '.cl',
       
   313   'China': '.cn',
       
   314   'Christmas Island': '.cx',
       
   315   'Cocos (Keeling) Islands': '.cc',
       
   316   'Colombia': '.co',
       
   317   'Comoros': '.km',
       
   318   'Congo': '.cg',
       
   319   'Congo, Democratic Republic of the': '.cd',
       
   320   'Cook Islands': '.ck',
       
   321   'Costa Rica': '.cr',
       
   322   'Croatia': '.hr',
       
   323   'Cyprus': '.cy',
       
   324   'Czech Republic': '.cz',
       
   325   'Denmark': '.dk',
       
   326   'Djibouti': '.dj',
       
   327   'Dominica': '.dm',
       
   328   'Dominican Republic': '.do',
       
   329   'East Timor': '.tl',
       
   330   'Ecuador': '.ec',
       
   331   'Egypt': '.eg',
       
   332   'El Salvador': '.sv',
       
   333   'Equatorial Guinea': '.gq',
       
   334   'Eritrea': '.er',
       
   335   'Estonia': '.ee',
       
   336   'Ethiopia': '.et',
       
   337   'Falkland Islands': '.fk',
       
   338   'Faroe Islands': '.fo',
       
   339   'Fiji': '.fj',
       
   340   'Finland': '.fi',
       
   341   'France': '.fr',
       
   342   'French Guyana': '.gf',
       
   343   'French Southern Territories': '.tf',
       
   344   'Gabon': '.ga',
       
   345   'Gambia': '.gm',
       
   346   'Georgia': '.ge',
       
   347   'Germany': '.de',
       
   348   'Ghana': '.gh',
       
   349   'Gibraltar': '.gi',
       
   350   'Greece': '.gr',
       
   351   'Greenland': '.gl',
       
   352   'Grenada': '.gd',
       
   353   'Guadeloupe (French)': '.gp',
       
   354   'Guam (USA)': '.gu',
       
   355   'Guatemala': '.gt',
       
   356   'Guinea': '.gn',
       
   357   'Guinea Bissau': '.gw',
       
   358   'Guyana': '.gy',
       
   359   'Haiti': '.ht',
       
   360   'Heard and McDonald Islands': '.hm',
       
   361   'Holy See (Vatican City State)': '.va',
       
   362   'Honduras': '.hn',
       
   363   'Hong Kong': '.hk',
       
   364   'Hungary': '.hu',
       
   365   'Iceland': '.is',
       
   366   'India': '.in',
       
   367   'Indonesia': '.id',
       
   368   'Iraq': '.iq',
       
   369   'Ireland': '.ie',
       
   370   'Israel': '.il',
       
   371   'Italy': '.it',
       
   372   "Ivory Coast (Cote D'Ivoire)": '.ci',
       
   373   'Jamaica': '.jm',
       
   374   'Japan': '.jp',
       
   375   'Jordan': '.jo',
       
   376   'Kazakhstan': '.kz',
       
   377   'Kenya': '.ke',
       
   378   'Kiribati': '.ki',
       
   379   'Kuwait': '.kw',
       
   380   'Kyrgyz Republic (Kyrgyzstan)': '.kg',
       
   381   'Laos': '.la',
       
   382   'Latvia': '.lv',
       
   383   'Lebanon': '.lb',
       
   384   'Lesotho': '.ls',
       
   385   'Liberia': '.lr',
       
   386   'Libya': '.ly',
       
   387   'Liechtenstein': '.li',
       
   388   'Lithuania': '.lt',
       
   389   'Luxembourg': '.lu',
       
   390   'Macau': '.mo',
       
   391   'Macedonia': '.mk',
       
   392   'Madagascar': '.mg',
       
   393   'Malawi': '.mw',
       
   394   'Malaysia': '.my',
       
   395   'Maldives': '.mv',
       
   396   'Mali': '.ml',
       
   397   'Malta': '.mt',
       
   398   'Marshall Islands': '.mh',
       
   399   'Martinique (French)': '.mq',
       
   400   'Mauritania': '.mr',
       
   401   'Mauritius': '.mu',
       
   402   'Mayotte': '.yt',
       
   403   'Mexico': '.mx',
       
   404   'Micronesia': '.fm',
       
   405   'Moldavia': '.md',
       
   406   'Monaco': '.mc',
       
   407   'Mongolia': '.mn',
       
   408   'Montenegro': '.me',
       
   409   'Montserrat': '.ms',
       
   410   'Morocco': '.ma',
       
   411   'Mozambique': '.mz',
       
   412   'Namibia': '.na',
       
   413   'Nauru': '.nr',
       
   414   'Nepal': '.np',
       
   415   'Netherlands': '.nl',
       
   416   'Netherlands Antilles': '.an',
       
   417   'New Caledonia (French)': '.nc',
       
   418   'New Zealand': '.nz',
       
   419   'Nicaragua': '.ni',
       
   420   'Niger': '.ne',
       
   421   'Nigeria': '.ng',
       
   422   'Niue': '.nu',
       
   423   'Northern Mariana Islands': '.mp',
       
   424   'Norway': '.no',
       
   425   'Oman': '.om',
       
   426   'Pakistan': '.pk',
       
   427   'Palau': '.pw',
       
   428   'Palestinian Territories': '.ps',
       
   429   'Panama': '.pa',
       
   430   'Papua New Guinea': '.pg',
       
   431   'Paraguay': '.py',
       
   432   'Peru': '.pe',
       
   433   'Philippines': '.ph',
       
   434   'Pitcairn Island': '.pn',
       
   435   'Poland': '.pl',
       
   436   'Polynesia (French)': '.pf',
       
   437   'Portugal': '.pt',
       
   438   'Puerto Rico': '.pr',
       
   439   'Qatar': '.qa',
       
   440   'Reunion (French)': '.re',
       
   441   'Romania': '.ro',
       
   442   'Russian Federation': '.ru',
       
   443   'Rwanda': '.rw',
       
   444   'South Georgia & South Sandwich Islands': '.gs',
       
   445   'Saint Helena': '.sh',
       
   446   'Saint Kitts & Nevis Anguilla': '.kn',
       
   447   'Saint Lucia': '.lc',
       
   448   'Saint Pierre and Miquelon': '.pm',
       
   449   'Saint Tome (Sao Tome) and Principe': '.st',
       
   450   'Saint Vincent & Grenadines': '.vc',
       
   451   'Samoa': '.ws',
       
   452   'San Marino': '.sm',
       
   453   'Saudi Arabia': '.sa',
       
   454   'Senegal': '.sn',
       
   455   'Serbia': '.rs',
       
   456   'Seychelles': '.sc',
       
   457   'Sierra Leone': '.sl',
       
   458   'Singapore': '.sg',
       
   459   'Slovak Republic': '.sk',
       
   460   'Slovenia': '.si',
       
   461   'Solomon Islands': '.sb',
       
   462   'Somalia': '.so',
       
   463   'South Africa': '.za',
       
   464   'South Korea': '.kr',
       
   465   'Spain': '.es',
       
   466   'Sri Lanka': '.lk',
       
   467   'Suriname': '.sr',
       
   468   'Svalbard and Jan Mayen Islands': '.sj',
       
   469   'Swaziland': '.sz',
       
   470   'Sweden': '.se',
       
   471   'Switzerland': '.ch',
       
   472   'Tadjikistan': '.tj',
       
   473   'Taiwan': '.tw',
       
   474   'Tanzania': '.tz',
       
   475   'Thailand': '.th',
       
   476   'Togo': '.tg',
       
   477   'Tokelau': '.tk',
       
   478   'Tonga': '.to',
       
   479   'Trinidad and Tobago': '.tt',
       
   480   'Tunisia': '.tn',
       
   481   'Turkey': '.tr',
       
   482   'Turkmenistan': '.tm',
       
   483   'Turks and Caicos Islands': '.tc',
       
   484   'Tuvalu': '.tv',
       
   485   'USA Minor Outlying Islands': '.um',
       
   486   'Uganda': '.ug',
       
   487   'Ukraine': '.ua',
       
   488   'United Arab Emirates': '.ae',
       
   489   'United Kingdom': '.uk',
       
   490   'United States': '.us',
       
   491   'Uruguay': '.uy',
       
   492   'Uzbekistan': '.uz',
       
   493   'Vanuatu': '.vu',
       
   494   'Venezuela': '.ve',
       
   495   'Vietnam': '.vn',
       
   496   'Virgin Islands (British)': '.vg',
       
   497   'Virgin Islands (USA)': '.vi',
       
   498   'Wallis and Futuna Islands': '.wf',
       
   499   'Western Sahara': '.eh',
       
   500   'Yemen': '.ye',
       
   501   'Zambia': '.zm',
       
   502   'Zimbabwe': '.zw',
       
   503 }