だから私はUsers(django.contrib.auth.models import Userから)とUserProfilesを持っています。私のUserProfileビューには、編集リンクがあります。この編集リンクにより、ユーザーはユーザー設定を変更できます。フォームのパスワードセクションに、次のようなヘルプテキストが表示されます。
"Use '[algo]$[salt]$[hexdigest]' or use the change password form."
「パスワード変更フォーム」は実際にはhttp://127.0.0.1:8000 / user / 1 / user_edit / password /へのリンクです。リンクをクリックすると、次のようなエラーメッセージが表示されます。
ViewDoesNotExist at /user/1/user_edit/password/
Could not import testdb.views.django.contrib.auth.views. Error was: No module named django.contrib.auth.views
私はドキュメントに従っています:https ://docs.djangoproject.com/en/dev/topics/auth/
私は何が間違っているのですか?これはdjangosテンプレートを使用する必要があると聞きましたが、それらをアプリテンプレートフォルダーにコピーする必要がありますか?もしそうなら、彼らはどこにいますか?
URLS.PY
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('testdb.views',
url(r'^$', 'index'),
url(r'^^user/(?P<user_id>\d+)/$', 'user_detail'),
url(r'^user/(?P<user_id>\d+)/user_edit/$', 'user_edit'),
url(r'^user/(?P<user_id>\d+)/user_edit/password/$', 'django.contrib.auth.views.password_change', {'template_name': 'password_change_form'}),
)