Skip to content Skip to sidebar Skip to footer

Django South: How Can I Access Models In Sub-packages In Migrations

Since our app has many models, we place them in sub-packages of the models packages, i.e. the Cheddarmodel would not be in models.Cheddar, but instead in models.cheese.Cheddar. It

Solution 1:

Turns out, the problem was in the fact, that the Cheddar model was not listed in the DataMigration instance's modelsproperty:

classMigration(DataMigration):
    # ...

    models = {
        # ...
    }

Once I added the correct model definition in there (which was in the previous migration for me), the data migration worked.

Post a Comment for "Django South: How Can I Access Models In Sub-packages In Migrations"