'WSGIRequest'对象没有属性'facebook' [英] 'WSGIRequest' object has no attribute 'facebook'

查看:112
本文介绍了'WSGIRequest'对象没有属性'facebook'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图实现 django-socialregistration ,包括所有的依赖,我刚刚遵循这些指示。在Facebook认证后,我有这个错误:

Im trying to implement django-socialregistration, with all dependences included, I just followed those instructions. im having this error after authenticating with facebook:

'WSGIRequest' object has no attribute 'facebook'
C:\Python25\lib\site-packages\socialregistration\views.py in facebook_login
    108. if not request.facebook.check_session(request):

什么im丢失?一些中间件除外? thx:)

what im missing? some middleware excepted? thx :)

推荐答案

解决

添加'facebook.djangofb.FacebookMiddleware' to MIDDLEWARE_CLASSES in settings.py will attached一个 facebook 对每个传入请求的对象。

adding 'facebook.djangofb.FacebookMiddleware' to MIDDLEWARE_CLASSES in settings.py will attach a facebook object to every incoming request.

这篇关于'WSGIRequest'对象没有属性'facebook'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆