Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

src/a/k/akvo-rsr-HEAD/akvo/iso_countries.py   akvo-rsr(Download)
from django.db.models import get_model
 
from rsr.iso3166 import ISO_3166_COUNTRIES, COUNTRY_CONTINENTS, CONTINENTS
 
def convert():
        if country.iso_code:
            continent_code = COUNTRY_CONTINENTS[country.iso_code]
            country.continent = dict(CONTINENTS)[continent_code]
            country.continent_code = continent_code
        country.save()