2011-03-07 75 views

回答

0

django-social-auth提供意见为认证的选择关联django.contrib.auth社会权威性

与特定的广管局ckend(如Google,Facebook或Twitter)。看看在social_auth的URLconf中定义的代码:https://github.com/omab/django-social-auth/blob/master/social_auth/urls.py

一旦你安装social_auth,如果你想与Twitter登录,你会参观begin URL指定相应的后端(如/登录/推特/)。 social_auth应用会将您的用户重定向到Twitter,此时他们会授权您的应用,然后您将重定向到complete网址(例如/ complete/twitter)。

如果你想一个Twitter帐户与现有的用户(即,通过admin应用程序,或类似的东西django-registration创建的用户)联系起来,你会参观associate_begin网址(如“/联想/叽叽喳喳/” )。

这一切都假定你的根URLconf中包含类似的条目:

url(r'', include('social_auth.urls')),