2011-09-21 71 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/$(账户的根)