from decimal import Decimal
from django.db import transaction
from catalog.models import Subscription

for sub in Subscription.objects.all():
    sid = transaction.savepoint()
    new_sub = Subscription()
    new_sub.sku = sub.sku + "FC"
    new_sub.shipping_method = "FIRST_CLASS"
    new_sub.title = sub.title
    new_sub.location = sub.location
    new_sub.duration = sub.duration
    new_sub.created_by = sub.created_by
    new_sub.last_updated_by = sub.last_updated_by
    new_sub.price = sub.price + Decimal("100.00")
    new_sub.shipping_cost = Decimal("2.00")
    new_sub.shipping_cost_multiple = 1
    new_sub.save()
    transaction.savepoint_commit(sid)
