我正在使用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社交身份验证,运行迁移并安装它。 –