2012-06-16 58 views
5

我无法使用django-allauth。我收到这个错误。使用django-allauth

NoReverseMatch at/accounts/login/ 未找到参数'()'和关键字参数'{}'的'facebook_channel'反向。

到目前为止,我一直都在关注这封信。

这里是我的settings.py从管理模块allauth提供

INSTALLED_APPS = (
    'django.contrib.auth', 
    'django.contrib.contenttypes', 
    'django.contrib.sessions', 
    'django.contrib.sites', 
    'django.contrib.messages', 
    'django.contrib.staticfiles', 
    # Uncomment the next line to enable the admin: 
    'django.contrib.admin', 
    # Uncomment the next line to enable admin documentation: 
    # 'django.contrib.admindocs', 
    'app', 
    'uni_form', 
    'emailconfirmation', 
    'allauth', 
    'allauth.account', 
    'allauth.socialaccount', 
    'allauth.socialaccount.providers.facebook', 
    'allauth.socialaccount.providers.twitter', 
) 


TEMPLATE_CONTEXT_PROCESSORS = (
    "django.core.context_processors.request", 
    "allauth.context_processors.allauth", 
    "allauth.account.context_processors.account", 
    "django.contrib.auth.context_processors.auth", 
) 

AUTHENTICATION_BACKENDS = (
    "allauth.account.auth_backends.AuthenticationBackend", 
) 

我也有加入Facebook的秘密和应用程序ID。

期待快速回复。

回答

10

刚刚面对并解决了同样的问题。你需要安装了Facebook SDK鸡蛋,这Django的allauth依赖,即:

pip install -e git://github.com/pythonforfacebook/facebook-sdk.git#egg=facebook-sdk 

(顺便说一下,如果你正在使用Django 1.4,则确认,由于电子邮件地址时遇到一个运行时错误Django的allauth不使用新的时区感知日期。在快速的解决办法是设置

USE_TZ = False 

在你的settings.py。)

+1

哈哈感谢。我刚刚进入TZ错误,你的帖子非常方便。 <3 – debuggerpk