Django无法找到社交认证网址模式

时间:2016-06-26 09:34:25

标签: python django steam-web-api social-authentication

我尝试为Steam登录按钮设置社交身份验证。我已经跟踪了所有these steps,并添加了必要的东西:为设置添加API密钥,为身份验证后端添加steam.SteamOpenId

错误:

Using the URLconf defined in Test.urls, Django tried these URL patterns, in this order:
^ ^$ [name='index']
^login/(?P<backend>[^/]+)/$ [name='begin']
^complete/(?P<backend>[^/]+)/$ [name='complete']
^disconnect/(?P<backend>[^/]+)/$ [name='disconnect']
^disconnect/(?P<backend>[^/]+)/(?P<association_id>[^/]+)/$ [name='disconnect_individual']
^admin/

我用来制作登录按钮的超链接:

<a href="/login/steam?next=/">Login</a>

urls.py项目文件:

from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^', include('Home.urls')),
    url('', include('social.apps.django_app.urls', namespace='social')),
    url(r'^admin/', admin.site.urls),
]

urls.py申请文件Home

from django.conf.urls import url

from . import views

app_name = 'Home'
urlpatterns = [
    url(r'^$', views.index, name='index'),
]

Full Project Here.

我想知道是否还需要设置一些东西,我是否需要为url模式添加视图?如果是这样,那么?社交认证URL文件位于何处?

0 个答案:

没有答案