views:

176

answers:

2

I have a migration:

    ...

def forwards(self, orm):
    for p in products.models.Product.objects.all():
        new = cart.models.Product(title = p.title)
        new.save()

    def backwards():
        ...

But when I run migrate it runs through the loop twice.

+3  A: 

do you have

no_dry_run = True

in the migration definition?

besides, I think you should be using orm.Product.objects.all()

Ofri Raviv
A: 

where can i find documentation of data migration for 0.7 version?