2017-11-01 13 views
0

あなたが訪問したときに、私は私のDjangoのプロジェクトでDjangoの登録Reduxのを使用しています、問題は、マッピングのURLで起こっ:ジャンゴ登録Reduxのエラー

http://127.0.0.1:8000/accounts/register/

それがに私をリダイレクトします。

http://127.0.0.1:8000/accounts/profile/

エラーメッセージを

:ここ

Using the URLconf defined in trydjango18.urls, Django tried these URL 
patterns, in this order: 
    ^$ [name='home'] 
    ^contact$ [name='contact'] 
    ^about$ [name='about'] 
    ^admin/ 
    ^accounts/ 
    ^activate/complete/$[name='registration_activation_complete'] 
    ^accounts/ 
    ^activate/resend/$[name='registration_resend_activation'] 
    ^accounts/ 
    ^activate/(P<activation_key>\w+)/$[name='registration_activate'] 
    ^accounts/ ^register/complete/$ [name='registration_complete'] 
    ^accounts/ ^register/closed/$ [name='registration_disallowed'] 
    ^accounts/ ^register/$ [name='registration_register'] 
    ^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/complete/$[name='auth_password_reset_complete'] 
    ^accounts/ ^password/reset/done/$ [name='auth_password_reset_done'] 
    ^accounts/ ^password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(? 
    P<token>.+)/$ [name='auth_password_reset_confirm'] 
    ^static\/(?P<path>.*)$ 
    ^media\/(?P<path>.*)$ 
The current URL, accounts/profile/, didn't match any of these. 
You're seeing this error because you have DEBUG = True in your 
Django settings file. Change that to False, and Django will display 
a standard 404 page. 

はsettings.py

INSTALLED_APPS = (
'django.contrib.admin', 
'django.contrib.contenttypes', 
'django.contrib.sessions', 
'django.contrib.messages', 
'django.contrib.staticfiles', 

'django.contrib.sites', 
'registration', #should be immediately above 'django.contrib.auth' 
'django.contrib.auth', 

'crispy_forms', 

'newsletter',) 

ACCOUNT_ACTIVATION_DAYS = 7 REGISTRATION_AUTO_LOGIN = True のための私のコードはここにurls.pyのために私のコードです:

urlpatterns = [ 
url(r'^$', 'newsletter.views.home', name='home'), 
url(r'^contact$', 'newsletter.views.contact', name='contact'), 
url(r'^about$','trydjango18.views.about',name='about'), 
url(r'^admin/', include(admin.site.urls)), 
url(r'^accounts/', include('registration.backends.default.urls')),] 

答えて

0

LOGIN_REDIRECT_URLを設定することができます。

+0

settings.pyに 'LOGIN_REDIRECT_URL = '/ accounts/register /''を設定しましたが、ページをリクエストしたときにGETリクエストが多すぎるとブラウザにメッセージが表示されます: '127.0.0.1あなたを何度もリダイレクトしました」 –

関連する問題