0

アプリで django social auth を使用していますが、Page not found エラーが見つかりました。アプリにインストールし、アプリと並行してプロジェクトに配置しました。

また、URLファイルにURLを追加しました

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

しかし、エラーが表示されると、URLファイル内のURLのリストと、探している必要なURLがある場所が表示されます。

エラーページは次のとおりです。

Page not found (404)
Request Method: GET
Request URL:    http://abc.com/login/
Using the URLconf defined in webdev.urls, Django tried these URL patterns, in this order:
^$ [name='home']
^polls/
^admin/doc/
^admin/
^register1/
^edit/
^edit1/
^customerreg/
^checkout/
^checkout1/
^order/
^order1/
^upload/
^upload1/
^product/
^profile/
^logout/
^login/(?P<backend>[^/]+)/$ [name='socialauth_begin']
^complete/(?P<backend>[^/]+)/$ [name='socialauth_complete']
^associate/(?P<backend>[^/]+)/$ [name='socialauth_associate_begin']
^associate/complete/(?P<backend>[^/]+)/$ [name='socialauth_associate_complete']
^disconnect/(?P<backend>[^/]+)/$ [name='socialauth_disconnect']
^disconnect/(?P<backend>[^/]+)/(?P<association_id>[^/]+)/$ [name='socialauth_disconnect_individual']
The current URL, login/, didn't match any of these.

上記のリストでは、url ファイルにその url があることがわかりますが、アクセスしていません ??

4

1 に答える 1

1
^login/(?P<backend>[^/]+)/$ [name='socialauth_begin']

http://abc.com/login/URLパターンにはバックエンドパラメータが必要なため、このURLはと一致しません。

このようなものはアクセスしているURLと一致しますが、そこにはバックエンドパラメータがないため、ビューでデフォルトのものを選択することをお勧めします。

url(r'^login/$', 'your_view',),
于 2012-10-02T07:15:28.727 に答える