2011-09-21 76 views
0

我想安裝Django的註冊,它不認識的網址。我得到404錯誤當我訪問http://localhost:8000/accounts/Django註冊不識別urls.py帳戶頁面?

Page not found (404) 
Request Method:  GET 
Request URL: http://localhost:8000/accounts/ 

Using the URLconf defined in namekeepr.urls, Django tried these URL patterns, in this order: 


    ^pk/$ 
    ^pk/index/$ 
    ^admin/ 
    ^accounts/ ^activate/complete/$ [name='registration_activation_complete'] 
    ^accounts/ ^activate/(?P<activation_key>\w+)/$ [name='registration_activate'] 
    ^accounts/ ^register/$ [name='registration_register'] 
    ^accounts/ ^register/complete/$ [name='registration_complete'] 
    ^accounts/ ^register/closed/$ [name='registration_disallowed'] 
    ^accounts/ ^login/$ [name='auth_login'] 
    ^accounts/ ^logout/$ [name='auth_logout'] 
    ^accounts/ ^password/change/$ [name='auth_password_change'] 
    ^accounts/ ^password/change/done/$ [name='auth_password_change_done'] 
    ^accounts/ ^password/reset/$ [name='auth_password_reset'] 
    ^accounts/ ^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$ [name='auth_password_reset_confirm'] 
    ^accounts/ ^password/reset/complete/$ [name='auth_password_reset_complete'] 
    ^accounts/ ^password/reset/done/$ [name='auth_password_reset_done'] 
    ^admin/ 
    ^accounts/profile/$ 
    ^accounts/password_reset/$ 
    ^accounts/password_reset_done/$ 
    ^accounts/password_change/$ 
    ^accounts/password_change_done/$ 

The current URL, accounts/, didn't match any of these. 

回答

1

嘗試去http://localhost:8000/accounts/與末尾的斜槓。這是'常規'django網址,通常它會重定向到這個,但它不是由於某種原因....但在你試圖解決問題之前,應該確保它以這種方式工作。

基於服務器的響應
+0

OK,只是編輯的上方,當我做,以反映賬戶/ –

+0

看起來你沒有一個爲^帳戶/?定義的網址 – Dave

+0

hmm ...以及我在主應用程序urls.py中使用了(r'^ accounts /',include('registration.urls')),以包含django-registration urls.py.我應該以不同的方式做?它沒有正確傳遞? –

1

,你還沒有定義的網址爲^/accounts/$(賬戶的根)