google
设置oauth2时出现错误
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
149. response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
147. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/allauth/socialaccount/providers/oauth2/views.py" in view
69. return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/allauth/socialaccount/providers/oauth2/views.py" in dispatch
92. app = provider.get_app(self.request)
File "/usr/local/lib/python2.7/dist-packages/allauth/socialaccount/providers/base.py" in get_app
52. return SocialApp.objects.get_current(self.id, request)
File "/usr/local/lib/python2.7/dist-packages/allauth/socialaccount/models.py" in get_current
38. provider=provider)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py" in manager_method
122. return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in get
387. self.model._meta.object_name
Exception Type: DoesNotExist at /accounts/google/login/
Exception Value: SocialApp matching query does not exist.
更新
设置文件
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'sorl.thumbnail',
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
#'allauth.socialaccount.providers.facebook',
'allauth.socialaccount.providers.google',
'allauth.socialaccount.providers.linkedin_oauth2',
#'allauth.socialaccount.providers.paypal',
'allauth.socialaccount.providers.twitter',
'django.contrib.admin',
'django_countries',
'accounts'
)
和谷歌设置
更新
将社交路径域从子域编辑为主kazichimp.com
会在下面创建网址不匹配。可能oauth只适用于主域。