Exemplo n.º 1
0
 if column_number == 3:
     country_name = cell.value
 if column_number == 7:
     country_special_notes = cell.value
 if column_number == 8:
     country_region = cell.value
 if column_number == 9:
     country_income_group = cell.value
 if column_number == 24:
     country_latest_census = cell.value
 if column_number == 25:
     country_latest_survey = cell.value
 if column_number == 26:
     country_recent_income_source = cell.value
 if column_number == 30:
     entity_info = AdditionalCountryInfo()
     entity_info.country_code = country_code
     entity_info.country_name = country_name
     entity_info.country_wb_region = country_region
     entity_info.country_wb_income_group = country_income_group
     entity_info.country_special_notes = country_special_notes
     entity_info.country_latest_census = country_latest_census
     entity_info.country_latest_survey = country_latest_survey
     entity_info.country_recent_income_source = country_recent_income_source
     entity_info.save()
     if country_tool_names_dict.get(unidecode.unidecode(country_name.lower()), 0):
         newentity = Entity.objects.get(name=country_tool_names_dict[unidecode.unidecode(country_name.lower())].owid_name)
     elif country_name in existing_entities_list:
         newentity = Entity.objects.get(name=country_name)
     else:
         newentity = Entity(name=country_name, validated=False)