Sajid Ahmad
Sajid Ahmad

Reputation: 1144

ImportError: cannot import name migrations in python-social-auth

I am using django==1.6. I installed python-social-auth for social authentication. But when I am trying to migrate the Database i am getting this error.

    from django.db import models, migrations
    ImportError: cannot import name migrations

I tried to installed the older version of python-social-auth but still this error exists. what should I do to solve this problem. Help will be appreciated.

Upvotes: 2

Views: 2396

Answers (1)

AlexMeng
AlexMeng

Reputation: 833

python-social-auth tries to use Django's built in migrations by default. These only work on Django versions >= 1.7. If you are using an older version of Django, and using South, there is still support for that. You need to add this to your settings:

SOUTH_MIGRATION_MODULES = {
    'default': 'social.apps.django_app.default.south_migrations',
}

Source: Github Issue #456

Upvotes: 2

Related Questions