def run():
    FrozenPriceCurrency.objects.no_cache().all().delete()
    for k in sorted(tiers.keys()):
        v = tiers[k]
        try:
            tier = Price.objects.filter(price=k).no_transforms()[0]
        except __HOLE__:
            print 'Tier does not exist: {0}'.format(k)
            continue

        for country, values in v.items():
            FrozenPriceCurrency.objects.create(
                tier=tier,
                carrier=None,
                provider=1,
                price=values['price'],
                region=values['region'],
                currency=values['currency']
            )
            print 'Creating: {0}, {1}'.format(k, country)
dataset/ETHPy150Open mozilla/addons-server/src/olympia/migrations/607-reboot-price-currencies.py/run