【问题标题】:django-social-auth on google app engine谷歌应用引擎上的 django-social-auth
【发布时间】:2012-02-21 20:18:56
【问题描述】:

我无法让 django-social-auth 与我使用 djangoappengine 和 django-nonrel 在 Google 的 App Engine 上部署的 Django 应用程序一起工作。

我是这方面的菜鸟,这对我来说相当复杂! 我从django-nonrel template 开始使用video,虽然我得到了登录页面,但它总是给我错误-Incorrect authentication service。 如果我没有为 Google-oauth2 定义使用者密钥和秘密,那么我会在 Google 的页面上收到 invalid client 错误。

当我运行测试 social_auth 时,我遇到了 FAILED(errors=9) 问题 Ensure that the backend for the testcase gets cached.self.assertTrue(self.user) AssertionError: None is not true for all the errors

有人可以告诉我下一步我应该做什么来让它工作吗?非常感谢!

【问题讨论】:

    标签: django google-app-engine django-socialauth


    【解决方案1】:

    非常感谢您的回答,Thodoris,

    只是为了完成:

    【讨论】:

      【解决方案2】:

      我刚刚陷入这个问题,并认为即使您已经解决了这个问题,如果有答案,对其他人也会有所帮助。

      httplib2主页下载最新版本。 提取存档并移动项目主文件夹中的内部 httplib2 文件夹(位于 python2 子文件夹中)。 然后最后在你的 INSTALLED_APPS 部分中添加“httplib2”,在 social_auth 的依赖项之上。

      例如这里是我的 INSTALLED_APPS:

      INSTALLED_APPS = (
          'django.contrib.contenttypes',
          'django.contrib.auth',
          'django.contrib.sessions',
          'djangotoolbox',
          'autoload',
          'dbindexer',
          'httplib2',#    These 4 are
          'openid',#      what u need to
          'oauth2',#      integrate social_auth plug
          'social_auth',# in your GAE project
          'myapp',
          'djangoappengine',
      )
      

      注意:您还必须在项目文件夹中放置:openid、oauth2 和 social_auth,因为您无法在 GAE 上安装它们。

      【讨论】:

        猜你喜欢
        • 2013-08-29
        • 2016-03-11
        • 1970-01-01
        • 1970-01-01
        • 2012-03-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-08-20
        相关资源
        最近更新 更多