/'上下文中的AttributeError'对象没有属性请求'

时间:2017-03-19 05:33:37

标签: python django facebook

我正在尝试使用django-allauth进行Facebook登录。但是,当我登录facebook时,user.username仍为null。然后,我尝试遵循django-allauth文档中的代码,但它不断抛出错误。

map = %{
  "test" => "teet",
  "tututu" => "tururuuu",
  "caligueva" => %{"speeking": "speeeeeeee"}
}

以下相应代码:

AttributeError at /
'Context' object has no attribute 'request'
    Request Method: GET
    Request URL:    http://localhost:8000/
    Django Version: 1.10.6
    Exception Type: AttributeError
    Exception Value:    
    'Context' object has no attribute 'request'
    Exception Location: C:\Users\prairie5270\django\lib\site-packages\allauth\compat.py in template_context_value, line 25
    Python Executable:  C:\Users\prairie5270\django\Scripts\python.exe
    Python Version: 3.6.0
    Python Path:    
    ['C:\\Users\\prairie5270\\Desktop\\website',
     'C:\\Users\\prairie5270\\django\\Scripts\\python36.zip',
     'C:\\Users\\prairie5270\\django\\DLLs',
     'C:\\Users\\prairie5270\\django\\lib',
     'C:\\Users\\prairie5270\\django\\Scripts',
     'c:\\users\\prairie5270\\appdata\\local\\programs\\python\\python36\\Lib',
     'c:\\users\\prairie5270\\appdata\\local\\programs\\python\\python36\\DLLs',
     'C:\\Users\\prairie5270\\django',
     'C:\\Users\\prairie5270\\django\\lib\\site-packages']

非常感谢您提前!我很乐意提供任何帮助

0 个答案:

没有答案