背景:
django版本:2.1.0
使用了social_django模块。
TypeError: __init__() missing 1 required positional argument: 'strategy'
setting.py文件
INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', # 'social_django',] AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'social_core.backends.weibo.WeiboOAuth2', 'social_core.backends.qq.QQOAuth2', 'social_core.backends.weixin.WeixinOAuth2', 'social_core.backends.github.GithubOAuth2',)
解决办法:
参考:https://github.com/python-social-auth/social-app-django-mongoengine/issues/2