Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Django Allauth google错误:SocialApp匹配查询不存在_Python_Django_Django Allauth - Fatal编程技术网

Python Django Allauth google错误:SocialApp匹配查询不存在

Python Django Allauth google错误:SocialApp匹配查询不存在,python,django,django-allauth,Python,Django,Django Allauth,使用django allauth为google设置oauth2时单击google 可以在下面的错误日志中查看登录页面和社交身份验证设置 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, r

使用
django allauth
为google设置oauth2时单击
google

可以在下面的错误日志中查看登录页面和社交身份验证设置

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'
)
和谷歌设置

更新

将社交路径域从子域编辑到main
kazichimp.com
会在下面创建url不匹配。oauth可能只在主域上工作


您的settings.py是什么样子的?您在Google oauth上的设置是什么?更新了问题解决了问题确保使用重定向urlhttp://example.com/accounts/twitter/login/callback/根据提供程序,您的settings.py是什么样子的?您在Google oauth上的设置是什么?更新了问题解决了问题确保使用重定向urlhttp://example.com/accounts/twitter/login/callback/取决于提供商