我已經安裝python-social-auth==0.3.6
。然後我遷移並得到了一個錯誤:遷移時出錯 - 「沒有名爲'social_django'的模塊。」
from social_django.models import AbstractUserSocialAuth, UserSocialAuth, Nonce, Association, Code, DjangoStorage
ImportError: No module named 'social_django'
我已經安裝python-social-auth==0.3.6
。然後我遷移並得到了一個錯誤:遷移時出錯 - 「沒有名爲'social_django'的模塊。」
from social_django.models import AbstractUserSocialAuth, UserSocialAuth, Nonce, Association, Code, DjangoStorage
ImportError: No module named 'social_django'
[更新]:什麼工作對我來說是這樣的:
pip install python-social-auth[django]
INSTALLED_APPS
'django_social',
我跑遷移,./manage.py migrate
你需要ins高大python-social-auth[django]
:
pip install python-social-auth[django]
,然後添加'social.apps.django_app.default'
您INSTALLED_APPS
。
然後不要忘記運行遷移:./manage.py migrate
ISTALLED_APPS:INSTALLED_APPS = [ '帳戶', '圖像', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 「django.contrib.sessions ' 'django.contrib.messages', 'django.contrib.staticfiles', 'social.apps.django_app.default',但同樣的錯誤 – Rifa84
AUTHENTICATION_BACKENDS:AUTHENTICATION_BACKENDS =( ' social.backends.facebook.Facebook2OAuth2 ', 'social.backends.google.GoogleOAuth2', 'social.backends.twitter.TwitterOAuth', 'django.contrib.auth.backends.ModelBacke nd', 'account.authentication.EmailAuthBackend', – Rifa84
您是否安裝了社交授權應用程序django? –
我
pip install django-rest-framework-social-oauth2==1.0.4 social-auth-core==0.2.1 python-social-auth==0.2.21 django-oauth-toolkit==0.10.0
還我已經安裝瞭解決:PIP安裝python-社會AUTH [Django的]和PIP安裝社會auth- APP-Django的。但同樣的錯誤發生。 Django的版本== 1.10.5 – Rifa84
如果你點擊凍結,你會得到什麼? –
(書籤)C:\ Python34> PIP凍結 defusedxml == 0.5.0 Django的== 1.10.6 Django的allauth == 0.31.0 oauthlib == 2.0.2 枕頭== 2.9.0 PyJWT == 1.4.2 蟒蛇 - 社會 - AUTH == 0.3.6 python3-openid的== 3.1.0 請求== 2.13.0 請求,oauthlib == 0.8.0 6 == 1.10.0 社會-auth-app-django == 1.1.0 social-auth-core == 1.2.0 – Rifa84