2011-09-21 5 views
0

장고 등록을 설정하려고하는데 URL을 인식하지 못합니다. 내가 http://localhost:8000/accounts/장고 - 등록이 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/에가는 시도 방문 할 때 나는 오류 404을 얻는다. 그건 '일반'django URL, 일반적 으로이 리디렉션 할 것이지만 어떤 이유로되지 않습니다 ....하지만 전에 문제를 해결하려고하면이 방법을 작동하는지 확인해야합니다.

서버 응답에 따라
+0

, 그냥 내가 할 때 반영하기 위해 위의 내용을 확인 편집 ^/accounts/$ (계정의 루트)에 대한 URL을 정의하지 않은 당신이없는 것 같습니다/ –

+0

계정 그냥^accounts /에 정의 된 URL? – Dave

+0

음 ... 잘 마스터 응용 프로그램 urls.py에서 django-registration urls.py를 포함하도록 (r '^ accounts /', include ('registration.urls')) 사용했습니다. 나는 그것을 다르게해야만 하는가? 올바르게 통과하지 못했습니까? –

관련 문제