我正在使用python-social-auth。但是當我運行makemigrations並遷移。表「social_auth- *」未創建。關係「social_auth_usersocialauth」不存在。遷移不會創建這些表
我的settings.py看起來像這樣
INSTALLED_APPS += (
'social.apps.django_app.default',
)
AUTHENTICATION_BACKENDS += (
'social.backends.facebook.FacebookOAuth2',
'social.backends.google.GoogleOAuth2',
'social.backends.twitter.TwitterOAuth',
)
SOCIAL_AUTH_USER_MODEL = AUTH_USER_MODEL
# Rausnehmen wenns Probleme mit der Auth. gibt
SOCIAL_AUTH_PIPELINE = (
'social.pipeline.social_auth.social_details',
'social.pipeline.social_auth.social_uid',
'social.pipeline.social_auth.auth_allowed',
'social.pipeline.social_auth.social_user',
'social.pipeline.user.get_username',
'social.pipeline.social_auth.associate_by_email', # <--- enable this one. to match users per email adress
'social.pipeline.user.create_user',
'social.pipeline.social_auth.associate_user',
'social.pipeline.social_auth.load_extra_data',
'social.pipeline.user.user_details',
)
from sharadar.soc_auth_config import *
同另一臺機器上沒有工作,沒有任何瑕疵。在此機器上我收到:
Operations to perform:
Apply all migrations: admin, auth, contenttypes, easy_thumbnailsguardian, main, myauth, sessions, social_auth
Running migrations:
Applying myauth.0002_auto_20170220_1408... OK
social_auth包括在這裏。
但在新電腦上我八方通收到
Exception Value:
relation "social_auth_usersocialauth" does not exist
LINE 1: ...er"."bio", "myauth_shruser"."email_verified" FROM "social_au...
在使用谷歌權威性在我運行Django應用程序不包含
social_auth當我運行遷移
Operations to perform:
Apply all migrations: admin, auth, contenttypes, easy_thumbnails, guardian, myauth, sessions
Running migrations:
No migrations to apply.
任何幫助appretiated。
親切的問候
邁克爾
你有兩臺不同的設置? –
是的,我有一臺電腦與工作設置。但是我無法讓它在第二個 – mbieren
上運行。在遷移自定義用戶模型後,您的舊安裝程序python-social-auth migrations可能已經運行。我的意思是在這種情況下遷移順序可能很重要。您可以嘗試在新設置中禁用python社交身份驗證,運行遷移並安裝它。 –