我正在尝试使用django-allauth。我按照github页面上的说明进行操作,完成了以下步骤:
Added allauth urls into urls.py
urlpatterns += patterns ('', url('^accounts/', include('allauth.urls')), url('^accounts/profile/$', ProfileView.as_view(), name='ProfileView'), url('^login/$', login, name='account_login'), url('^logout/$', logout, name='account_logout'), url('^login/cancelled/$', login_cancelled, name='socialaccount_login_cancelled'), url('^login/error/$', login_error, name='socialaccount_login_error'), )
Updated
TEMPLATE_CONTEXT_DIRS
,TEMPLATE_CONTEXT_PROCESSORS
,AUTHENTICATION_BACKENDS
andINSTALLED_APPS
. Also addedACCOUNT_AUTHENTICATION_METHOD = "username_email"
Added Key and Secret for twitter in the Social apps table.
Copied django-allauth templates to my app's directory and modified it. I can see all the templates working fine like
/accounts/signup/
and/accounts/social/connections/
.
/accounts/twitter/login/
进行连接或注册时,会出现以下错误信息:
我是否遗漏了什么?可能是一些愚蠢的错误(Twitter登录网址?没有线索!)。我还尝试找到基于最新代码库的一些教程,但都无法找到。Github上的django-allauth示例并没有提供任何帮助。请帮忙看看。另外,请随意提供任何基于最新代码库的链接或教程。社交网络登录失败
尝试通过您的社交网络帐户进行登录时发生错误。
谢谢您的帮助。