0

I am using south in my django project. I just added social_auth in settings.py, when i run this command: python manage.py schemamigration social_auth --auto

It says:Nothing seems to have changed.

Please let me know how can i create tables for social auth, as by this command the table is not getting created.

2
  • Have you actually verified that the tables do not exist yet?
    – schacki
    Mar 16, 2014 at 6:48
  • Yes i verified it.. but it is working now.. by the command mentioned in the comment. python manage.py migrate social_auth
    – Nilesh
    Mar 18, 2014 at 16:43

2 Answers 2

3

django-social-auth works perfectly except that it needs South and it doesn't work with newer versions of Django.

To remove the dependencies form South in django-social-auth, simply remove the migrations created by South and create new ones using the newer migration engine from Django 1.7 >.

This is how I fixed it:

# Install django (if you haven't) and django-social-auth
(my_venv)$ pip install django django-social-auth

# Delete the South migrations
# Using a virtual environment: my_venv
# In case you use python3, replace
(my_venv)$ rm <path_to_my_venv>/lib/python2.7/site-packages/social_auth/migrations/000*

# Create an dummy django project
(my_venv)$ django-admin startproject asdf

Add django-social-auth to the asdf/settings.py file

### asdf/asdf/settings.py
...
INSTALLED_APPS = (
    ...
    'social_auth',
)
...

Finally create the new migration for django-social-auth

# Create new migrations
$ python asdf/manage.py makemigrations social_auth

# Delete the dummy django-project
$ rm -r asdf

This fix will work for all the Django projects that work under the same virtual environment.

3
  • This fixed it for me using django 1.8. Thanks. Feb 2, 2016 at 1:36
  • Awesome, this worked for me! I have added a reference to your suggested solution here ( code.djangoproject.com/ticket/24524#comment:20 ).
    – jbrendel
    Mar 22, 2016 at 18:34
  • django-social-auth is no longer maintained and it has been replaced in favor of python-social-auth link. Depending on your case, it is relatively simple to migrate from one platform to another and it is HIGHLY recommended :) Apr 14, 2016 at 4:25
2

I don't think you need to generate migrations for social_auth, since this app should already have its migrations. Rather, you need to execute them, so after you added 'social_auth' in your settings you have to run only this command:

python manage.py migrate social_auth
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.