0

I have a Django Application in which I wanted to include social logins so I decided to choose 'python-social-auth' for that purpose but the problem is that when I include social.apps.django_app.default in INSTALLED_APPS in settings.py and run ./manage.py makemigrations I get the following error

ImportError: No module named apps.django_app

The reason for this is, I guess, that I have an app named 'social' in my INSTALLED_APPS so when django start reads through this tuple it conflicts the social in the beginning of social.apps.django_app.default with the social app.

I hope I could make you understand my point. If I did please help me out in solving this problem. :)

Edit:

Here is a snippet from settings.py

INSTALLED_APPS = (
    ...
    'social',
    ...
    'social.apps.django_app.default',
)

As the first answer suggests I can change the refer to the app with a different name. Now the problem is that I can change the 'social' to something else using AppConfig, but again when the interpreter tries to read 'social.apps.django_app.default' it looks in the local app folder named social. How can I make it look into the distribution files that reside in my python2.7/site-packages folder?

Mahammad Adil Azeem
  • 9,112
  • 13
  • 57
  • 84

1 Answers1

0

As of Django 1.7, there is App Config, which allows you to change the name with which you refer to an app in INSTALLED_APPS, allowing you to avoid name conflicts.

mcastle
  • 2,882
  • 3
  • 25
  • 43